Docker compose, set local volume mapping with version 3
Probably simple, but I dont find any thing about this. My composer config file (version 3), define two volumes to be shared with others services : version: "3" services: nginx: build: docker/nginx ports: - "80:80" volumes: - config:/etc/nginx/conf.d - data:/var/http networks: - default container_name: nginx networks: default: volumes: config: data: How to set/attach the local directories (ex. d:/nginx/etc, d:/nginx/http) mapped to this volumes on the config file (or the docker-compose up command) ?
You may try to replace your volumes lines this way : data:/var/http -> path/to/local/dir:/var/http Moreover assuming that you are running Windows, it should look like this : - //d/nginx/etc:/etc/nginx/conf.d - //d/nginx/http:/var/http Then remove the global volumes section.
Race conditions after changing names in docker-compose.yml
Docker compose - image not found
How to work out the hostname that compose gives containers?
docker-compose restart container if service is dead
Swarm scheduling not working as expected using filters in compose file
issues in buiding Slate with Docker
Invalid type error in Docker Compose
Django cookiecutter with Docker add pip package
Docker Compose + Swarm + Machine Networking issue
docker-compose build image parameters --force-rm --pull
linking 2 containers through docker compose
Files created by manage.py commands not chown'd from root user
Is it possible to create an intermediate image within docker-compose?
docker-compose service listen on specified interface
Does Docker-Compose allow overwriting of ports when using extends?
Jhipster Docker-compose conflict