Preserve cache directory between builds

This commit is contained in:
Alexander
2013-10-28 08:54:04 +01:00
parent 7b74935210
commit 6350f373be
2 changed files with 5 additions and 3 deletions

View File

@@ -2,6 +2,7 @@
## 0.2.0 (in progress)
* Cache dir is preserved across builds
* Application config (environment variable management)
* Basic hooks/plugin system
* Exposed commands over SSH using sshcommand
@@ -17,4 +18,4 @@
* Bootstrap script for Ubuntu system
* Basic push / deploy with git
* Hostname support with Nginx
* Support for Java, Ruby, Node.js buildpacks
* Support for Java, Ruby, Node.js buildpacks

5
dokku
View File

@@ -23,12 +23,13 @@ case "$1" in
;;
build)
APP="$2"; IMAGE="$3"
APP="$2"; IMAGE="$3"; CACHE_DIR="$HOME/$APP/cache"
id=$(cat | docker run -i -a stdin progrium/buildstep /bin/bash -c "mkdir -p /app && tar -xC /app")
test $(docker wait $id) -eq 0
docker commit $id $IMAGE > /dev/null
[[ -d $CACHE_DIR ]] || mkdir $CACHE_DIR
pluginhook pre-build $APP $IMAGE
id=$(docker run -d $IMAGE /build/builder)
id=$(docker run -d -v $CACHE_DIR:/cache $IMAGE /build/builder)
docker attach $id
test $(docker wait $id) -eq 0
docker commit $id $IMAGE > /dev/null