Skip to content

Instantly share code, notes, and snippets.

@gilou
Last active November 7, 2018 22:57
Show Gist options
  • Save gilou/f0d82b21308ec4c9722d3558ffddc161 to your computer and use it in GitHub Desktop.
Save gilou/f0d82b21308ec4c9722d3558ffddc161 to your computer and use it in GitHub Desktop.
Dockerfile arch systemd
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"]
@gilou
Copy link
Author

gilou commented Nov 7, 2018

pas oublier de lancer avec : -v /sys/fs/cgroup:/sys/fs/cgroup:ro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment