NomadNet/Dockerfile.build

33 lines
837 B
Docker
Raw Normal View History

2023-09-07 04:19:38 -04:00
FROM python:alpine
LABEL authors="Petr Blaha petr.blaha@cleverdata.cz"
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 ###########################################