snappass/Dockerfile
Samuel Dion-Girardeau 73c220be97 Update Docker image to Python 3.7 (current latest)
Also used the "slim" version, which will drastically reduce the
image size.

Base image sizes comparison:

| python:3.7-slim | 143MB |
| python:3.7      | 916MB |
2018-07-12 21:27:32 -04:00

23 lines
449 B
Docker

FROM python:3.7-slim
ENV APP_DIR=/usr/src/snappass
RUN groupadd -r snappass && \
useradd -r -g snappass snappass && \
mkdir -p $APP_DIR
WORKDIR $APP_DIR
COPY ["setup.py", "MANIFEST.in", "README.rst", "AUTHORS.rst", "$APP_DIR/"]
COPY ["./snappass", "$APP_DIR/snappass"]
RUN python setup.py install && \
chown -R snappass $APP_DIR && \
chgrp -R snappass $APP_DIR
USER snappass
# Default Flask port
EXPOSE 5000
CMD ["snappass"]