Skip to content

CarloDePieri/docker-archlinux-systemd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Archlinux with Systemd

prod Docker Cloud Automated build

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

Images are built by GitHub CI and pushed to DockerHub at least once a month.

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 git@github.com: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.