Add $DOCKER_ARGS and docker-args pluginhook to dokku deploy and command run.

This commit is contained in:
Dyson Simmons
2013-11-29 15:52:26 +11:00
parent 56de22a3c8
commit aaa4f0fade
2 changed files with 6 additions and 3 deletions

3
dokku
View File

@@ -63,7 +63,8 @@ case "$1" in
fi
# start the app
id=$(docker run -d -p 5000 -e PORT=5000 $IMAGE /bin/bash -c "/start web")
DOCKER_ARGS=$(pluginhook docker-args $APP)
id=$(docker run -d -p 5000 -e PORT=5000 $DOCKER_ARGS $IMAGE /bin/bash -c "/start web")
echo $id > "$DOKKU_ROOT/$APP/CONTAINER"
port=$(docker port $id 5000 | sed 's/0.0.0.0://')
echo $port > "$DOKKU_ROOT/$APP/PORT"

View File

@@ -35,7 +35,7 @@ case "$1" in
echo "App $APP does not exist"
exit 1
fi
if [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]]; then
CONTAINER=$(<$DOKKU_ROOT/$APP/CONTAINER)
docker logs $CONTAINER | tail -n 100
@@ -58,7 +58,9 @@ case "$1" in
exit 1
fi
shift 2
docker run -i -t $IMAGE /exec "$@"
DOCKER_ARGS=$(pluginhook docker-args $APP)
docker run -i -t $DOCKER_ARGS $IMAGE /exec "$@"
;;
url)