Skip to content
Permalink
Browse files

Make systemctl symlinks

  • Loading branch information...
Cat5TV committed Aug 19, 2019
1 parent 3a904ba commit 82671a45a4f8efb1096f5a694fd5374d15aa42c8
Showing with 6 additions and 3 deletions.
  1. +2 −0 notes/docker/docker-container.md
  2. +4 −3 notes/docker/image/Dockerfile
@@ -1,3 +1,5 @@
Key point is that NEMS' Docker Container requires systemd, but as that would pose a security risk, I have opted to instead go with docker-systemctl-replacement. I've setup an environment that should behave much like a virtual appliance.

- Run in image folder: `docker build -t nemslinux .`
- Get the Docker ID: Note the output of "Successfully built ####"
- Run the container as daemon: `docker run --mount type=tmpfs,destination=/tmp,tmpfs-mode=1770 --name nemslinux -d ##DOCKERID##`
@@ -29,9 +29,10 @@ RUN wget -O /tmp/systemctl.zip https://github.com/gdraheim/docker-systemctl-repl
unzip systemctl.zip && \
cd docker-systemctl-replacement* && \
make && \
mv -f ./files/docker/systemctl3.py /bin/systemctl && \
chmod +x /bin/systemctl \
cp -f /bin/systemctl /usr/bin/systemctl
mv -f ./files/docker/systemctl3.py /usr/bin/ && \
chmod +x /usr/bin/systemctl3.py && \
ln -s /usr/bin/systemctl3.py /bin/systemctl && \
ln -s /usr/bin/systemctl3.py /usr/bin/systemctl

#CMD ["/bin/bash", "-c", "/bin/systemctl"]

0 comments on commit 82671a4

Please sign in to comment.
You can’t perform that action at this time.