/ Dockerfile
Dockerfile
1 FROM python:3.12-alpine as build 2 3 RUN apk add --no-cache build-base linux-headers libffi-dev cargo 4 5 # Create a virtualenv that we'll copy to the published image 6 RUN python -m venv /opt/venv 7 ENV PATH="/opt/venv/bin:$PATH" 8 RUN pip3 install setuptools-rust pyopenssl cryptography 9 10 COPY . /app/ 11 RUN cd /app/ && pip3 install . 12 13 # Use multi-stage build, as we don't need rust compilation on the final image 14 FROM python:3.12-alpine 15 16 LABEL org.opencontainers.image.documentation="https://github.com/markqvist/NomadNet#nomad-network-daemon-with-docker" 17 18 ENV PATH="/opt/venv/bin:$PATH" 19 ENV PYTHONUNBUFFERED="yes" 20 COPY --from=build /opt/venv /opt/venv 21 22 VOLUME /root/.reticulum 23 VOLUME /root/.nomadnetwork 24 25 ENTRYPOINT ["nomadnet"] 26 CMD ["--daemon"]