Last active
April 12, 2020 15:21
-
-
Save ojhaujjwal/9e25cf80eb639ec1a7db244c4ff5655e to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env sh | |
set -eu | |
export GCP_PROJECT=my-gcp-project | |
export APP_NAME=cloudrun-node-app-demo | |
# Logging in to GCR using service account credentials placed on ./gcp-credentials.json | |
cat ./gcp-credentials.json | docker login -u _json_key --password-stdin https://gcr.io | |
export IMAGE_TAG=$(git rev-parse HEAD) | |
export IMAGE_NAME = gcr.io/${GCP_PROJECT}/${APP_NAME}:${IMAGE_TAG} | |
docker build -t ${IMAGE_NAME} -f Dockerfile . | |
docker push ${IMAGE_NAME} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment