-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Docker] Update README and use better image name
- Loading branch information
Showing
5 changed files
with
46 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Build files | ||
build | ||
diagnostic-output | ||
target | ||
|
||
# Support files | ||
|
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,3 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
docker build -f Dockerfile -t support-diagnostics-app . | ||
docker build -f Dockerfile -t docker.elastic.co/support/diagnostics:latest . |
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,41 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Pushes Support Diagnostic images to hosted Docker. | ||
# | ||
# 1) Pushes the image tagged `latest` (which should have been built via | ||
# `$ docker compose build`). | ||
# 2) If a version was passed in: | ||
# 2a) Add that version as a tag to latest. | ||
# 2b) Push that newly tagged version to hosted Docker. | ||
# | ||
# Example usages: | ||
# 1) Push latest | ||
# $ ./push-docker.sh | ||
# 2) Push latest and also tag as 9.1.1 | ||
# $ ./push-docker.sh 9.1.1 | ||
# | ||
|
||
IMAGE="docker.elastic.co/support/diagnostics" | ||
|
||
echo "$IMAGE" | ||
|
||
echo "Pushing latest" | ||
|
||
# NOTE: The pattern with ( set -x ; command ) makes it so that the command runs | ||
# in a sub-shell where the command is echo'd to the screen when run. We don't | ||
# want that mode permanently because the echo lines will duplicate in the console. | ||
( set -x ; docker push "$IMAGE:latest" ) | ||
|
||
# If there is a version parameter passed in | ||
if [[ $# -eq 1 ]]; then | ||
VERSION=${1} | ||
|
||
echo "Tagging version $VERSION" | ||
( set -x ; docker tag "$IMAGE:latest" "$IMAGE:$VERSION" ) | ||
|
||
echo "Pushing version $VERSION" | ||
( set -x ; docker push "$IMAGE:$VERSION" ) | ||
fi | ||
|
||
echo "All done!" |