Skip to content

Commit

Permalink
Merge pull request #358 from dyson/DOCKER_ARGS
Browse files Browse the repository at this point in the history
For #304: Add $DOCKER_ARGS and docker-args pluginhook to dokku deploy and command run.
  • Loading branch information
rhy-jot committed Dec 2, 2013
2 parents 56de22a + 1e76aba commit c77cbf1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dokku
Expand Up @@ -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"
Expand Down
6 changes: 4 additions & 2 deletions plugins/00_dokku-standard/commands
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit c77cbf1

Please sign in to comment.