Created
February 27, 2015 01:45
-
-
Save vizowl/9e4493a7d3f6203c4f2a to your computer and use it in GitHub Desktop.
Volume based makefile for docker containers with dependency management
This file contains 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
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