Add Dockerfile/.dockerignore files

This commit is contained in:
Samuel Dion-Girardeau 2016-07-16 06:57:18 -07:00
parent 6c3f8f6884
commit b34b5c4b69
2 changed files with 43 additions and 0 deletions

20
.dockerignore Normal file
View file

@ -0,0 +1,20 @@
# Source
.bumpversion.cfg
.dockerignore
.gitignore
.travis.yml
CONTRIBUTING.rst
docker-compose.yml
Dockerfile
requirements.txt
tests.py
tox.ini
# Generated
.tox
.coverage
*.rdb
junit*xml
# Other
.project

23
Dockerfile Normal file
View file

@ -0,0 +1,23 @@
FROM python:3.3
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"]