docker-compose


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.

Related Links

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

Categories

HOME
actionscript-3
google-cloud-pubsub
botframework
openacc
packet
mysqli
skypedeveloper
magento-1.9.2.1
data-modeling
crash
datetimepicker
multipartform-data
atlassian-fisheye
genexus
rtc
camunda
exchange-transport-agents
versioning
ringcentral
datasource
webgl-earth
cherrypy
infinite-loop
ppp
datastax-enterprise
oracle10g
windows-10-mobile
drawrect
jcr
luhn
traitsui
webclient
n1ql
gitosis
campaign-monitor
stencyl
redhat-brms
mapquest
libconfig
nscollectionview
google-cloud-powershell
peerjs
ocpjp
hierarchical-clustering
geminabox
dna-sequence
vertex
gige-sdk
multi-targeting
acceleo
alarmmanager
firebase-polymer
syslog4j
android-xmlpullparser
django-taggit
database-administration
phpdesigner
usps
camellia
android-progressbar
android-contentresolver
angular-promise
libgcrypt
edgar
biginsights
android-togglebutton
identifying
syncano
fileinputstream
numerical-recipes
esri-arc-engine
cordova-3
cocos2d-x-2.x
xpand
episerver-7
yandex-api
farpoint-spread
mongoid4
complete
xml-validation
fade
infomaker
nokogiri
servicemanager
simplemembership
setcookie
django-tinymce
zepto
algol
invalidoperationexception
mail-gem
jquery-1.8
nsscrollview
diazo
advanceddatagrid
facebook-winjs-sdk
opendir
fxcopcmd
viewdata
mediastreamsource
pitch-shifting
miniport
uccapi
dynamic-scope
atmega16

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App