-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #1231: start using smaller build context for otobo.nginx.docker…
…file.
- Loading branch information
1 parent
4278bdb
commit 554a29a
Showing
3 changed files
with
29 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
#!/bin/sh | ||
|
||
# Override the build command for automated builds on Docker Hub. | ||
# Override the build hook of the automated builds on Docker Hub. | ||
# The build hook is running in the root of the git sandbox. That is the directory contaning the file RELEASE. | ||
|
||
# See https://docs.docker.com/docker-hub/builds/advanced/ for the list of preset environment variables. | ||
# Additionally, the undocumented environment variable $BUILD_PATH is used. $BUILD_PATH can be set | ||
# in the input field Build Context of the Docker Hub automated build GUI. | ||
|
||
# The path to the Dockerfile is given relative to ./$BUILD_PATH in order to be compatible | ||
# with the default build hook in Docker Hub. The default value of the Build Context is '/'. The build command works with this approach, | ||
# because the resulting path will then be something like .//otobo.web.dockerfile. | ||
|
||
# These commands can be uncommented for debugging: | ||
#pwd | ||
#ls | ||
#docker -v | ||
#printenv | ||
|
||
# build the Docker image | ||
docker build\ | ||
--build-arg "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')"\ | ||
--build-arg "DOCKER_TAG=$DOCKER_TAG"\ | ||
--build-arg "GIT_COMMIT=$SOURCE_COMMIT"\ | ||
--build-arg "GIT_BRANCH=$SOURCE_BRANCH"\ | ||
--build-arg "GIT_REPO=$(git config --get remote.origin.url)"\ | ||
-f $DOCKERFILE_PATH\ | ||
-f ./$BUILD_PATH/$DOCKERFILE_PATH\ | ||
-t $IMAGE_NAME\ | ||
. | ||
./$BUILD_PATH |
This file contains 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 characters