Skip to content

Commit

Permalink
Merge pull request #53 from BenjamenMeyer/tools_vs-images-update
Browse files Browse the repository at this point in the history
Add the ability to pull images from docker hub
  • Loading branch information
BenjamenMeyer authored Nov 1, 2024
2 parents 531c0f8 + a245ba5 commit 1ff69e3
Showing 1 changed file with 15 additions and 0 deletions.
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

0 comments on commit 1ff69e3

Please sign in to comment.