This repository contains a docker-compose.yml
, which can be used to build
2 docker images from 2 services, devpi
and nginx
, which share a named volume server
.
The purpose of this image is to serve devpi with nginx.
Both images are currently based on
python:3.8.14-slim
.
The nginx webserver listens on the host port 80, which is mapped to 8080 in the container. You can
change this by adjusting proxy_set_header X-outside-url
in
nginx/nginx.conf
, the port mapping in
docker-compose.yml
and nginx/Dockerfile
.
docker image ls
This shows info about images, such as their IDs.
docker container ls -s
docker volume ls
docker-compose build
To rebuild an image, just re-execute the previous command above. Note that this doesn't affect the volumes, i.e. they are not deleted, and, if you changed something in the directory that is mounted to a volume, the next time you rebuild the image and the container, you will still have your changes.
docker-compose up -d
To recreate a container, just re-execute the previous command above. This also doesn't delete the existing volume.
docker image rm <image-id>
docker container stop <container-id>
docker container rm <container-id>
docker volume rm <volume-id>
docker volume prune
docker cp <container-id>:/devpi/server <host-destination-folder>
See the documentation.