-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a script for pushing images to the Docker Hub
Also adds Git SHA environment variable for production images.
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
# | ||
# Build image from the currently checked out version of CritiqueBrainz | ||
# and push it to the Docker Hub, with an optional tag (by default "latest"). | ||
# | ||
# Usage: | ||
# $ ./push.sh [tag] | ||
|
||
cd "$(dirname "${BASH_SOURCE[0]}")/../" | ||
|
||
TAG_PART=${1:-latest} | ||
docker build -t metabrainz/critiquebrainz:$TAG_PART --build-arg GIT_COMMIT_SHA=$(git rev-parse HEAD) . | ||
docker push metabrainz/critiquebrainz:$TAG_PART |