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

Build multiple images with Docker Compose?
JHipster Cassandra Docker Build
Defining project name inside docker-compose configuration
Docker-compose named mounted volume
cannot ping linked docker container service
How to do variable substitution in env_file?
How to create stack in tutum with docker-compose.yml file?
ecs-cli docker compose version
dynamic link update in docker-compose
How to start arbitrarily many identical containers with docker-compose?
How to stop docker-compose run command
Unable to run sensu check in a docker-compose context
Should I use docker-compose start or docker-compose up -d
Docker Compose automatically setting links
docker compose volumes not contains files
Inheritance or nesting with docker compose

Categories

HOME
mobile
typo3
domain-driven-design
network-programming
formatting
casting
ebay-api
opc-ua
foreach
normals
angular-universal
dynamics-crm-2011
decoding
ng2-charts
lambda-calculus
opendaylight
simd
ibatis
virtuemart
civicrm
glibc
bootstrap-datetimepicker
restructuredtext
aws-certificate-manager
akavache
windows-mobile
visual-studio-community
stack-trace
tftp
workflow-foundation
typeorm
semantic-ui-react
schedule
jcr
wit-ai
certbot
android-geofence
dom4j
flex3
stochastic-process
word-wrap
nsdateformatter
office-interop
electron-packager
jvisualvm
java-5
mtm
irr
intervention
encoder
evaluation
flask-socketio
lattice
glade
angular-i18n
nugetgallery
dcast
ooad
apache2-module
google-app-engine-php
skscene
wiql
edgar
dpkt
valdr-bean-validation
chrome-mobile
qxorm
aiff
javadb
go-gin
yosemite
powerpoint-2010
oxygenxml
debuggervisualizer
sendy
email-headers
db2-connect
thucydides
myrrix
tlbimp
octokit
xrandr
usersettings
uikit-dynamics
outlook-object-model
magicsuggest
system.transactions
microsoft-speech-platform
gpl
linqdatasource
erlide
xpolog
auto-compile
marathontesting
iphone-maps
miniport
linq-to-mysql
large-data-volumes
pkcs#7
file-storage
rpxnow
opengl-to-opengles
managed-code
office-2003
moores-law

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