Created
June 6, 2017 16:24
-
-
Save crittermike/4c43a63a6b1cd3f0d5f06677244ae721 to your computer and use it in GitHub Desktop.
Examples of volumes in docker-compose.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
volumes: | |
# Just specify a path and let the Engine create a volume | |
- /var/lib/mysql | |
# Specify an absolute path mapping | |
- /opt/data:/var/lib/mysql | |
# Path on the host, relative to the Compose file | |
- ./cache:/tmp/cache | |
# User-relative path | |
- ~/configs:/etc/configs/:ro | |
# Named volume | |
- datavolume:/var/lib/mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment