-
-
Save jonfriesen/18253e5c77382a7e2c23258aa0ff6820 to your computer and use it in GitHub Desktop.
Revisions
-
didip revised this gist
Jun 22, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,8 +2,9 @@ set -ex PARENT_DIR=$(basename "${PWD%/*}") CURRENT_DIR="${PWD##*/}" IMAGE_NAME="$PARENT_DIR/$CURRENT_DIR" TAG="${1}" REGISTRY="hub.docker.com" -
didip created this gist
Jun 22, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/bin/bash set -ex CURRENT_DIR="${PWD##*/}" IMAGE_NAME="${dirname $CURRENT_DIR}/$CURRENT_DIR" TAG="${1}" REGISTRY="hub.docker.com" docker build -t ${REGISTRY}/${IMAGE_NAME}:${TAG} . docker tag ${REGISTRY}/${IMAGE_NAME}:${TAG} ${REGISTRY}/${IMAGE_NAME}:latest docker push ${REGISTRY}/${IMAGE_NAME} docker tag ${REGISTRY}/${IMAGE_NAME}:latest ${REGISTRY}/${IMAGE_NAME}:${TAG} docker push ${REGISTRY}/${IMAGE_NAME}