Sign inSign up

carlodepieri/docker-archlinux-systemd

By carlodepieri

•Updated 5 months ago

An updated Archlinux docker image with Systemd support.

Image
1

3.2K

carlodepieri/docker-archlinux-systemd repository overview

⁠Docker Archlinux with Systemd

prod Docker Cloud Automated build Maintenance

An updated Archlinux docker image (based on archlinux⁠) with the full base group and Systemd support.

Images are built by GitHub CI, tagged and pushed to DockerHub once a month.

⁠Available tags

Arch is a rolling release distribution. This means that the available tags⁠ are nothing more than arbitrary snapshots of the distro at that particular time.

Beware when using tags in automated testing environments: while usually a good practice, keep in mind that in reality Arch is changing daily and that a system test with a pinned environment could become useless quickly. A more in-depth discussion on this can be found here⁠.

⁠From Docker Hub

A working Docker installation⁠ is needed. Then pull the image with:

docker pull carlodepieri/docker-archlinux-systemd

Create and start a container with:

docker run --detach --privileged carlodepieri/docker-archlinux-systemd

A shell can then be obtained with:

docker exec -it [container-id] env TERM=xterm bash

⁠From GitHub

Clone the repo first with:

git clone [email protected]:CarloDePieri/docker-archlinux-systemd.git
⁠Building the image

A working Docker installation⁠ is needed. Then run:

docker build --target build -t carlodepieri/docker-archlinux-systemd .

or, for convenience:

make

This will build the image. The command docker images can then be used to verify a successful build.

⁠Creating a new container

Run:

docker run --name=cdp-arch-systemd --detach --privileged carlodepieri/docker-archlinux-systemd

or, for convenience:

make run-container
⁠Connecting to the container

Run:

docker exec -it cdp-arch-systemd env TERM=xterm bash

or, for convenience:

make shell

⁠Compatibility with systems that need cgroups volumes

Certain combinations of systemd, docker and linux kernel cgroup configuration may require the cgroup folder manually mounted inside the container. In this case checkout the git repository and run:

docker build --target build_with_volume -t carlodepieri/docker-archlinux-systemd .

or:

make build-image-volume

Then run the container with:

docker run --name=cdp-arch-systemd --detach --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro carlodepieri/docker-archlinux-systemd

or:

make run-container-volume

A shell can still be obtained as illustrated above.

⁠Note

Containers started this way will have extended control over the host because of the --privileged flag.

Important: these steps are necessary to make systemd behave, but be sure to understand the security concerns involved⁠.

Tag summary

Content type

Image

Digest

sha256:ee486dcd1…

Size

169.1 MB

Last updated

5 months ago

docker pull carlodepieri/docker-archlinux-systemd