Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to pull images from docker hub #53

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tools/vs-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ function buildBaseImage() {
..
}

# Command: CMD_PULL_BASE_IMAGE
function pullBaseImage() {
local IMAGE_BASE="${1}"
local DOCKER_IMG_NAME="vegastrike/vega-strike-build-env:$(echo "${IMAGE_BASE}" | sed 's/:/_/' | sed 's/\//_/')"
${DOCKER} pull ${DOCKER_IMG_NAME}
}

# Command: CMD_BUILD_IMAGE
function buildImage() {
local IMAGE_BASE="${1}"
Expand Down Expand Up @@ -140,6 +147,7 @@ CMD_SHOW_RELEASE_IMAGES="show-ci-images"
CMD_SHOW_IMAGES="show-images"
CMD_BUILD_BASE_IMAGE="build-base"
CMD_BUILD_IMAGE="build"
CMD_PULL_BASE_IMAGE="pull-base"
CMD_RUN_IMAGE="run"

ARG_IMAGE_BASE="--image-base"
Expand Down Expand Up @@ -169,6 +177,7 @@ function printHelp() {
echo " ${CMD_SHOW_RELEASE_IMAGES} Show image targets used by the CI systems"
echo " ${CMD_SHOW_IMAGES} List Images used by the Vega Strike CI system available locally"
echo " ${CMD_BUILD_BASE_IMAGE} Build the base image (CI Image)"
echo " ${CMD_PULL_BASE_IMAGE} Pull the base image (CI Image) from Docker Hub"
echo " ${CMD_BUILD_IMAGE} Build the image (Dev Image)"
echo " ${CMD_RUN_IMAGE} Run the image"
echo
Expand Down Expand Up @@ -210,6 +219,12 @@ do
processOpErrors $?
exit $?
;;
"${CMD_PULL_BASE_IMAGE}")
printInfo
pullBaseImage "${IMAGE_BASE}"
processOpErrors $?
exit $?
;;
"${CMD_RUN_IMAGE}")
printInfo
runImage "${IMAGE_TAG}"
Expand Down
Loading