Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Cat5TV committed Aug 20, 2019
1 parent b368a43 commit 3904188
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
9 changes: 1 addition & 8 deletions notes/docker/docker-container.md
Original file line number Diff line number Diff line change
@@ -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`
6 changes: 6 additions & 0 deletions notes/docker/image/compile
Original file line number Diff line number Diff line change
Expand Up @@ -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

3 changes: 1 addition & 2 deletions notes/docker/image/stage1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3904188

Please sign in to comment.