Add Dockerfile

Closes #652.

Co-authored-by: James Newton <hello@jamesnewton.com>
This commit is contained in:
James Lu 2019-12-23 00:02:57 -08:00
parent a79354cd52
commit ae01c5e418
3 changed files with 46 additions and 0 deletions

25
.dockerignore Normal file
View File

@ -0,0 +1,25 @@
*.yml
*.yaml
# Git, CI, etc. config files
.*
test/
# Automatically generated by setup.py
/__init__.py
env/
build/
__pycache__/
.idea/
*.py[cod]
*.bak
*~
*#
*.save*
*.db
*.pid
*.pem
.eggs
*.egg-info/
dist/
log/

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM python:3-alpine
RUN adduser -D -H -u 10000 pylink
VOLUME /pylink
COPY . /pylink-src
RUN cd /pylink-src && pip3 install --no-cache-dir -r requirements-docker.txt
RUN cd /pylink-src && python3 setup.py install
RUN rm -r /pylink-src
USER pylink
WORKDIR /pylink
# Run in no-PID file mode by default
CMD ["pylink", "-n"]

4
requirements-docker.txt Normal file
View File

@ -0,0 +1,4 @@
cachetools
passlib
pyyaml
setuptools