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.
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
Clone the repo first with:
git clone git@github.com:CarloDePieri/docker-archlinux-systemd.git
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.
Run:
docker run --name=cdp-arch-systemd --detach --privileged carlodepieri/docker-archlinux-systemd
or, for convenience:
make run-container
Run:
docker exec -it cdp-arch-systemd env TERM=xterm bash
or, for convenience:
make shell
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.
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.