Skip to content

Instantly share code, notes, and snippets.

@iki
Last active April 20, 2020 09:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save iki/26b2a86cb026cae956e2a2482ee27158 to your computer and use it in GitHub Desktop.
Save iki/26b2a86cb026cae956e2a2482ee27158 to your computer and use it in GitHub Desktop.
Test volume mount in docker
version: "2"
services:
test:
# build: .
image: alpine
command: ls -l /data
volumes:
- .:/data
FROM alpine
WORKDIR /data
COPY . .
CMD ls -l /data
docker-compose -p test up
docker run --rm -v %cd:\=/%:/data alpine ls -l /data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment