Skip to content

Commit

Permalink
fix: always pull on run_container
Browse files Browse the repository at this point in the history
  • Loading branch information
klauserber committed Dec 6, 2022
1 parent 3bf09fb commit bcfb6e7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions run_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,29 @@

REGISTRY_NAME=isi006
IMAGE_NAME=coder-development-cluster
TAG=latest

echo "pull image ${REGISTRY_NAME}/${IMAGE_NAME}:${TAG}"
docker pull ${REGISTRY_NAME}/${IMAGE_NAME}:${TAG} > /dev/null

COMMAND=${1}

if [[ ! ${COMMAND} =~ ^(run_create|run_destroy|secrets_get|secrets_create|secrets_delete|get_kubeconfig)$ ]]; then
if [[ ! ${COMMAND} =~ ^(run_create|run_destroy|secrets_get|secrets_create|secrets_delete)$ ]]; then
echo "Usage: $0 COMMAND [google-project-name] [cluster-name]"
echo ""
echo " COMMANDS:"
echo " run_create - create a cluster"
echo " run_destroy - create a cluster"
echo " run_destroy - destroy a cluster"
echo " secrets_get - get the secrets from the google secret of a cluster"
echo " secrets_create - write the secrets to the google secret of a cluster"
echo " secrets_delete - delete the google secret of a cluster"
echo " get_kubeconfig - get the kubeconfig of a cluster"
echo ""
exit 1
fi


docker run -it \
-v $(pwd)/config:/app/config \
--rm \
--entrypoint=/app/${COMMAND}.sh \
${REGISTRY_NAME}/${IMAGE_NAME}:latest ${@:2}
${REGISTRY_NAME}/${IMAGE_NAME}:${TAG} ${@:2}

0 comments on commit bcfb6e7

Please sign in to comment.