Skip to content

Instantly share code, notes, and snippets.

@royseto
Last active June 5, 2016 23:08
Show Gist options
  • Save royseto/785f93110ad97bb19c4d5e43c94e7034 to your computer and use it in GitHub Desktop.
Save royseto/785f93110ad97bb19c4d5e43c94e7034 to your computer and use it in GitHub Desktop.
Docker beta13.1 issue with named volume persistence

This test case works as expected in both Docker for Mac beta13.1 and Docker Toolbox on Windows 10. However, I am having problems getting postgres data to persist in named volumes on beta13.1, where a very similar docker-compose.yml does this fine on Docker Toolbox.

Next step: make a standalone test case and post it to the Docker for Mac beta forum.

version: '2'
services:
named-volume-test:
build: .
command: ["/bin/sh", "-c", "echo 'hello world' >> /mnt/data/hello.txt"]
volumes:
- nvt:/mnt/data
volumes:
nvt: {}
FROM busybox
RUN /bin/mkdir -p /mnt/data && /bin/touch /mnt/data/hello.txt
VOLUME ["/mnt/data"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment