Alpine Linux Bash



Alpine docker image doesn't have bash installed by default. You will need to add following commands to get bash: RUN apk update && apk add bash If youre using Alpine 3.3+ then you can just do. RUN apk add -no-cache bash to keep docker image size small. (Thanks to comment from @sprkysnrky).

  • 3Installing packages
    • 3.2Setting up Xorg

Start by booting up Alpine (see these instructions on how to do that)
When you Alpine is up and running, do the initial setup.

# setup-alpine

First of all, make sure the sudo package is installed in your Alpine Linux system. By default, sudo is not installed. To install sudo in Alpine Linux as root user, run: # apk update # apk add sudo. Next, let us create a new user in Alpine Linux and grant sudo privileges to the newly created user. Create a sudo user in Alpine Linux. If you want to run glibc programs in Alpine Linux. Sudo mount -bind /sys sys sudo mount -t proc proc proc cp /etc/resolv.conf etc sudo chroot. Start by booting up Alpine (see these instructions on how to do that) When you Alpine is up and running, do the initial setup. # setup-alpine # setup-xorg-base. Enable Community Repository. How to Enable the Community Repository. Installing packages. Install basic desktop system and gnome packages. As of right now, these are in the testing repo.

# setup-xorg-base


Install basic desktop system and gnome packages. As of right now, these are in the testing repo.
This might take a few minutes depending on your network speed.

# apk add gnome


If you want to you can also install additional GNOME apps for a more complete GNOME experience with:

# apk add gnome-apps


Setting up udev

You'll have to enable udev in order for GNOME to function properly.

# apk add udev

# rc-update add udev

# rc-update add udev-trigger

# rc-update add udev-settle

Setting up Xorg

Alpine Linux Bash Path

Even when using GNOME Wayland you'll still need a setup Xorg for XWayland.

Alpine Linux Bashrc

Alpine Linux Bash

Video packages

$ apk search xf86-video

Then install the driver matching to your card, e.g. if you have an Intel iGPU:

# apk add xf86-video-intel

Also add the mesa-dri-swrast package:

Alpine Linux Bash

# apk add mesa-dri-swrast

Input packages

Usually libinput is the best choice, as it's integrated best with GNOME and offers advanced functionality (e.g. palm rejection for touchpads).

# apk add xf86-input-libinput

Start GDM and login with your user. You need a user other than root for this to succeed, since GDM will refuse starting if no user accounts (meaning accounts with a UID >= 1000) are available.

rc-service gdm start

Once you have verified that it actually works you can make gdm start up at boot:

rc-update add gdm

Bash

If you want to use the gnome-terminal/other terminal applications you will need to install bash. If you want a typical bash setup also enable bash completion:

# apk add bash

# apk add bash-completion

If you are unable to login, check /var/log/gdm/greeter.log, there may be output there from X to indicate failed modules, etc.

Bash

If logging in from GDM returns to logging screen, try

# apk add bash

(bug report: #10953 sorry cannot link yet)

Alpine Linux Bash Tutorial

Retrieved from 'http://wiki.alpinelinux.org/w/index.php?title=Gnome_Setup&oldid=17920'