Skip to content

Instantly share code, notes, and snippets.

@vizowl
Created February 27, 2015 01:45
Show Gist options
  • Save vizowl/9e4493a7d3f6203c4f2a to your computer and use it in GitHub Desktop.
Save vizowl/9e4493a7d3f6203c4f2a to your computer and use it in GitHub Desktop.
Volume based makefile for docker containers with dependency management
DATAVOL := docker-tutorial-data-container
all: out.png
out.png: run/* .datavol
docker run --rm --volumes-from=$(DATAVOL) -w /work -v $$PWD/run:/work \
-v /output ipython/scipystack make $(MFLAGS)
docker cp $(DATAVOL):/output/out.png .
.datavol:
docker run --name $(DATAVOL) -v /output debian
touch $@
clean:
docker rm -f $(DATAVOL)
rm -f out.png .datavol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment