Adds Dockerfile with a compose example.

This commit is contained in:
André Freitas 2015-10-26 22:58:03 +00:00
parent 1a9b782d96
commit d7ee3d936e
3 changed files with 61 additions and 0 deletions

37
.dockerignore Normal file
View File

@ -0,0 +1,37 @@
*.class
*.pyc
*.pyo
*.o
*.so
*.os
*.pyd
*.elc
*~
.*.swp
.*.swo
.*.swn
.~
.DS_Store
.ropeproject
ID
__pycache__/
/build/
/dist/
/*.egg*
/MANIFEST
/README.html
/pypi-server-standalone.py
/.project
/.pydevproject
/.tox/
/*.egg-info/
/.standalone
/.coverage
/htmlcov/
/.installed.cfg
/develop-eggs/
/eggs/
/parts/
/.cache/
/.settings/
Dockerfile

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM python:3.4
# Build
COPY . /code
WORKDIR /code
RUN python setup.py install
RUN pip install passlib
WORKDIR /
RUN rm -rf /pypiserver
# Data Directory
RUN mkdir -p /data/packages
WORKDIR /data
ENTRYPOINT ["pypi-server"]
CMD ["-p", "80", "packages"]
EXPOSE 80

7
docker-compose.yml Normal file
View File

@ -0,0 +1,7 @@
pypiserver:
image: pypiserver
volumes:
- /var/pypiserver:/data
command: -p 80 -P /data/.htaccess -a update,download,list /data/packages
ports:
- "8080:80"