Docker Community Forums

Share and learn in the Docker community.

Container has unspecified volumes

I have an image built with a Dockerfile cintaining:

VOLUME /etc/nginx \
   /etc/pki/tls \
   /etc/letsencrypt \
   /var/lib/ \
   /var/log/ \
   /var/www  # copy static content here

When I start a container from the image I map each volume to a volume that I created with docker volume create:

docker run -d -u 343002  -p 80:8080 -p 443:8443 \
    -v 02nginx.etc_letsencrypt:/etc/letsencrypt:Z \
    -v 02nginx.etc_nginx:/etc/nginx:ro \
    -v 02nginx.etc_pki_tls:/etc/pki/tls:ro \
    -v 02nginx.var_lib:/var/lib:Z \
    -v 02nginx.var_log:/var/log:Z \
    -v 02nginx.var_www:/var/www:Z \
    -v /dv/03pyff/md_feed:/var/www/md_feed:ro \
    -v /dv/03pyff/md_source/split:/var/www/md_source:ro r2h2/nginx02 /start.sh

When I inspect the container I find volume mappings that I did not specify:

            "Volumes": {
            "#": {},
            "/etc/letsencrypt": {},
            "/etc/nginx": {},
            "/etc/pki/tls": {},
            "/var/lib/": {},
            "/var/log/": {},
            "/var/www": {},
            "content": {},
            "copy": {},
            "here": {},
            "static": {}
        },

These volumes are empty. Where do these volumes with relative paths come from?

Solution: comments are not allowed after volume path specs …