Skip to content

Commit

Permalink
Merge pull request #34 from qwertyuiopzxcvbnmlkjhgfdsa1/feature/docke…
Browse files Browse the repository at this point in the history
…rize

dozkerize build
  • Loading branch information
markqvist authored Mar 1, 2024
2 parents 6026f42 + a562397 commit 3181e21
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM python:alpine
LABEL authors="Petr Blaha [email protected]"
USER root
RUN apk update
RUN apk add build-base libffi-dev cargo pkgconfig linux-headers py3-virtualenv

RUN addgroup -S myuser && adduser -S -G myuser myuser
USER myuser
WORKDIR /home/myuser

RUN pip install --upgrade pip
RUN pip install setuptools-rust pyopenssl cryptography


ENV PATH="/home/myuser/.local/bin:${PATH}"

################### BEGIN NomadNet ###########################################

COPY --chown=myuser:myuser requirements.txt requirements.txt

RUN pip install --user -r requirements.txt


COPY --chown=myuser:myuser . .

#Python create virtual environment
RUN virtualenv /home/myuser/NomadNet/venv
RUN source /home/myuser/NomadNet/venv/bin/activate

RUN make all

################### END NomadNet ###########################################
6 changes: 6 additions & 0 deletions Dockerfile.howto
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Run docker command one by one(all four), it will build NomadNet artifact and copy to dist directory.
# No need to build locally and install dependencies
docker build -t nomadnetdockerimage -f Dockerfile.build .
docker run -d -it --name nomadnetdockercontainer nomadnetdockerimage /bin/sh
docker cp nomadnetdockercontainer:/home/myuser/dist .
docker rm -f nomadnetdockercontainer
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
compiler==0.2.0
configobj==5.0.8
lxmf==0.3.2
rns==0.5.7
setuptools==68.0.0
urwid==2.1.2

0 comments on commit 3181e21

Please sign in to comment.