You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.6 KiB

11 years ago
10 years ago
11 years ago
10 years ago
  1. docker-devpi
  2. ============
  3. This repository contains a Dockerfile for devpi pypi server
  4. http://doc.devpi.net/latest/
  5. Installation
  6. `docker pull muccg/docker-devpi`
  7. Quickstart
  8. Start using
  9. ```
  10. docker run -d --name devpi \
  11. --publish 3141:3141 \
  12. --volume /srv/docker/devpi:/data \
  13. --env=DEVPI_PASSWORD=changemetoyoulongsecret \
  14. --restart always \
  15. muccg/docker-devpi
  16. ```
  17. Devpi creates a user named root by default, its password can be set with DEVPI_PASSWORD environment variable. Please set it, otherwise attacker can *execute arbitrary code* in your application by uploading modified packages.
  18. Persistence
  19. For devpi to preserve its state across container shutdown and startup you should mount a volume at `/data`. The quickstart command already includes this.
  20. Security
  21. Devpi creates a user named root by default, its password can be set with DEVPI_PASSWORD environment variable. Please set it, otherwise attacker can *execute arbitrary code* in your application by uploading modified packages.
  22. Usage
  23. To use this devpi cache to speed up your dockerfile builds, add pip as an optional cache:
  24. ```Dockerfile
  25. # configure apt to not install reccomendations
  26. RUN apt-get update \
  27. && apt-get install -y netcat \
  28. && rm -rf /var/lib/apt/lists/*
  29. # Use an optional pip cache to speed development
  30. RUN export HOST_IP=$(ip route| awk '/^default/ {print $3}') \
  31. && mkdir -p ~/.pip \
  32. && echo [global] >> ~/.pip/pip.conf \
  33. && echo extra-index-url = http://$HOST_IP:3141/app/dev/+simple >> ~/.pip/pip.conf \
  34. && echo [install] >> ~/.pip/pip.conf \
  35. && echo trusted-host = $HOST_IP >> ~/.pip/pip.conf \
  36. && cat ~/.pip/pip.conf
  37. ```