David K. Bainbridge | 14d5840 | 2018-02-07 23:24:28 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | echo "=> Using custom build hook to add build arguments" |
| 4 | echo "=> set DEBUG=true to see debug information" |
| 5 | |
Jonathan Hart | b5046b0 | 2018-03-20 10:09:46 -0700 | [diff] [blame] | 6 | TAG=${DOCKER_TAG:-latest} |
| 7 | |
David K. Bainbridge | 14d5840 | 2018-02-07 23:24:28 -0800 | [diff] [blame] | 8 | if [ "$DEBUG" == "true" ]; then |
| 9 | env | sort |
| 10 | fi |
| 11 | |
| 12 | cd /src/${BUILD_CODE}${BUILD_PATH} |
| 13 | |
| 14 | if [ "$DEBUG" == "true" ]; then |
| 15 | echo docker build --build-arg REPOSITORY=$REPOSITORY --build-arg REGISTRY=$REGISTRY --build-arg TAG=${TAG:-latest} -t $IMAGE_NAME -f $DOCKERFILE_PATH . |
| 16 | fi |
| 17 | |
| 18 | docker build --build-arg REPOSITORY=$REPOSITORY --build-arg REGISTRY=$REGISTRY --build-arg TAG=${TAG:-latest} -t $IMAGE_NAME -f $DOCKERFILE_PATH . |