docker-compose


docker share OS volume between services


This is an extract from Volume configuration reference, in docker docs.
version: "3"
services:
db:
image: db
volumes:
- data-volume:/var/lib/db
backup:
image: backup-service
volumes:
- data-volume:/var/lib/backup/data
volumes:
data-volume:
Can I have something similar mapped to a custom directory, instead of /var/lib/docker/volumes/?
Something like this:
version: "3"
services:
db:
image: db
volumes:
- data-volume:/var/lib/db
backup:
image: backup-service
volumes:
- data-volume:/var/lib/backup/data
volumes:
data-volume: /home/user/db
It is possible. See https://github.com/docker/docker/issues/19990#issuecomment-248955005
You will have to create the volume with docker cli.

Related Links

Gogs + Drone getsockopt: connection refused
Concourse result keeps loading
Docker-compose: AttributeError: 'module' object has no attribute 'ssl'
scaling a service with docker compose
Docker Compose apparently ignores COMPOSE_FILE
Where does Docker install gems on a mac
What is the difference between docker-machine and docker-compose?
Docker Compose port issue. Cannot launch docker project on localhost
Name an image built from running a docker-compose file
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

Categories

HOME
marie
postgresql-9.3
cxf
phantomjs
conceptual
grid
autocad
captcha
box2d
background-image
nsoperation
reportlab
cucumberjs
aws-devicefarm
spring-webflow
ejb-3.1
serenity-js
matlab-gui
infinite-loop
wai-aria
v4l2
ckeditor4.x
suitescript
setup-project
typeclass
custom-fields
hierarchy
drawrect
multilanguage
ios-autolayout
ibm-bpm
favorites
javax
intersection
motherboard
ngrok
jslider
google-cloud-powershell
autodesk-data-management
mtm
flume-ng
qt-quick
head
django-cors-headers
serialversionuid
htop
seyren
dmalloc
nsalert
dynatable
fileopendialog
gevent
easy68k
hdr
key-value-store
airwatch
angularfire
weblogic-maven-plugin
angular-i18n
calc
music-player
github-for-mac
wiql
bioconductor
redquerybuilder
vanilla-forums
litedb
firewire
photogrammetry
vectordrawable
radgrid
ultraedit
douglas-peucker
shunting-yard
conditional-comments
pnunit
dotcmis
episerver-7
sendy
email-headers
google-mirror-api
friendly-id
8-puzzle
octokit
zend-db-table
playing-cards
simplemembership
microsoft-speech-platform
metapost
quit
wpml
event-propagation
google-email-audit-api
filedialog
animationdrawable
datejs
scriptmanager
mscorlib
discussion-board
session-hijacking
onunload
fxcopcmd
lgpl
activescaffold
database-agnostic
jquery-attributes
linq-to-mysql
mysql-logic
appointment
scala-designer
authkit
content-delivery-network
jgrowl

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