Last active
November 7, 2018 22:57
-
-
Save gilou/f0d82b21308ec4c9722d3558ffddc161 to your computer and use it in GitHub Desktop.
Dockerfile arch systemd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM base/archlinux:latest | |
RUN \ | |
# First, update everything (start by keyring and pacman) | |
pacman -Sy && \ | |
pacman -S archlinux-keyring --noconfirm --noprogressbar --quiet && \ | |
pacman -S pacman --noconfirm --noprogressbar --quiet && \ | |
pacman-db-upgrade && \ | |
pacman -Su --noconfirm --noprogressbar --quiet && \ | |
# Install useful packages | |
pacman -S sudo systemd --noconfirm --noprogressbar --quiet && \ | |
# Mask systemd units which will fail | |
systemctl mask tmp.mount systemd-tmpfiles-setup.service && \ | |
# Because systemd is not installed in the same path across distributions | |
# The /sbin/init link may or may not be provided by the base image | |
if [ ! -e /sbin/init ]; then ln -s /lib/systemd/systemd /sbin/init; fi | |
VOLUME ["/sys/fs/cgroup", "/run"] | |
CMD ["/usr/lib/systemd/systemd"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pas oublier de lancer avec : -v /sys/fs/cgroup:/sys/fs/cgroup:ro