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

Docker-compose ps error
hyperledger-fabric getting-started failed to start cli container
how to make docker-compose pull latest images of certain services
network issue in one docker compose with keycloak and tomcat container
Docker compose, set local volume mapping with version 3
version control of docker-compose.yml
Limit resources in docker-compose v3
Docker compose: using relative service address in environment
Azure Container Service: Update Docker-Compose?
Docker compose: doesnt allow to use constraints if you have a env variable set
How to use visual studio docker function on Windows Home edition?
Passing arguments to docker compose file when using it for swarm
How to run ad hoc docker compose commands in Ansible?
Using custom hostnames for docker local development containers
Changing the network name?
Let external container know about subnets created by multiple docker-compose projects

Categories

HOME
indexing
alasql
sql-server-2014
service
locale
fortran
latex
skypedeveloper
terminal
css-selectors
samsung-gear-s2
dcos
minimax
apache-httpclient-4.x
drush
xmlhttprequest
fine-uploader
webseal
pylint
md2
include-path
aws-certificate-manager
deployment-descriptor
angular2-changedetection
login-required
ng2-bootstrap
imdb
dropdownbox
pyenv
kdevelop
mongoid5
queryover
latency
keychain
compiled-query
aura-framework
pyexcel
jquery-ui-slider
directadmin
vpython
smooth-streaming
nshttpurlresponse
f#-fake
bootstrap-carousel
piranha-cms
cloudconvert
skype-bots
standard-error
ajv
critical-section
chain
php-java-bridge
mod
cexception
jcomponent
adempiere
jsoncpp
grails-3.0.9
report-builder2.0
system.net
powerpoint-2010
windows-search
ios-enterprise
fscanf
rpt
isl
slimscroll
class-library
object-oriented-database
html5-filesystem
git-subtree
ekevent
uikit-dynamics
pageload
vline
nsregularexpression
beep
dancer
motorola-droid
unordered-set
facebook-winjs-sdk
idtabs
ruby-1.9
datejs
openwrap
peoplepicker
quazip
arraycollection
nyromodal
xslt-grouping
focus-stealing
pixel-bender
opengl-to-opengles
jettison
j++

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