Skip to content
Permalink
Browse files

Cleanup

  • Loading branch information...
Cat5TV committed Aug 20, 2019
1 parent b368a43 commit 3904188c21f5968ff36a8150db5dd4cced54c49b
Showing with 8 additions and 10 deletions.
  1. +1 −8 notes/docker/docker-container.md
  2. +6 −0 notes/docker/image/compile
  3. +1 −2 notes/docker/image/stage1/Dockerfile
@@ -1,14 +1,7 @@
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 .`
- Run the container as daemon: `docker run --mount type=tmpfs,destination=/tmp,tmpfs-mode=1770 --restart=unless-stopped --name nems -d nemslinux`

# - Connect to the container: `docker run -it ##DOCKERID## bash`
- Deploy the container as daemon: `docker run --mount type=tmpfs,destination=/tmp,tmpfs-mode=1770 --restart=unless-stopped --stop-timeout 120 --name nems -d nemslinux`
- Connect to the container: `docker exec -it nemslinux bash`
- Compile NEMS Linux as normal, platform 21.
- Run NEMS Linux: `docker exec -d nemslinux`

##How to operate

- nemslinux must first be running as daemon: `docker run -d nemslinux`
- To access terminal of NEMS Server: `docker exec -it nemslinux bash`
@@ -4,5 +4,11 @@
# Thanks to cube8021 for pointing out this feature on Discord
# Done a bit differently here since the stages are all local (not public)

# Prep Debian Buster for NEMS Linux conversion
docker build -t nemsprep stage1

# Deploy and compile NEMS Linux
docker build -t nemslinux stage2

# Prepare Image

@@ -19,16 +19,15 @@ RUN apt-get update && \
apt-get install -y ca-certificates wget ssl-cert git unzip make python3 procps

# Setup faux systemctl environment
RUN rm -f /bin/systemctl
RUN wget -O /tmp/systemctl.zip https://github.com/gdraheim/docker-systemctl-replacement/archive/v1.4.3000.zip && \
cd /tmp && \
unzip systemctl.zip && \
cd docker-systemctl-replacement* && \
make && \
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
RUN test -L /bin/systemctl || ln -sf /usr/bin/systemctl /bin/systemctl

RUN /usr/sbin/make-ssl-cert generate-default-snakeoil --force-overwrite

0 comments on commit 3904188

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