Skip to content

Instantly share code, notes, and snippets.

@michaelneale
Created July 7, 2014 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelneale/8e4179297ebb63370804 to your computer and use it in GitHub Desktop.
Save michaelneale/8e4179297ebb63370804 to your computer and use it in GitHub Desktop.
Systemd in docker (non priv attempt)
FROM cloudbees/archbase
RUN systemctl mask tmp.mount
RUN rm /usr/lib/systemd/system/tmp.mount && ln -s '/dev/null' '/usr/lib/systemd/system/tmp.mount'
RUN cd /usr/lib/systemd/system/ \
&& sed -i 's/PrivateTmp=yes//g' systemd-timedated.service \
&& sed -i 's/PrivateTmp=yes//g' systemd-machined.service \
&& sed -i 's/PrivateTmp=yes//g' systemd-hostnamed.service \
&& sed -i 's/PrivateTmp=yes//g' systemd-localed.service \
&& sed -i 's/PrivateTmp=yes//g' systemd-timesyncd.service \
&& sed -i 's/PrivateTmp=yes//g' systemd-journal-gatewayd.service
RUN cd /usr/lib/systemd/system && for i in *.service; do sed -i 's/PrivateDevices=yes//g' $i; done
RUN cd /usr/lib/systemd/system && for i in *.service; do sed -i 's/PrivateNetwork=yes//g' $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment