Skip to content

Instantly share code, notes, and snippets.

@sagar290
Forked from iki/Dockerfile
Created April 20, 2020 09:20
Show Gist options
  • Save sagar290/4785ef170486d44d7129bfb2c3b42f3b to your computer and use it in GitHub Desktop.
Save sagar290/4785ef170486d44d7129bfb2c3b42f3b 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