Skip to content

Instantly share code, notes, and snippets.

@ValentaTomas
Created June 9, 2021 17:49
Show Gist options
  • Save ValentaTomas/7db9cd6578b3ed8702f4f8332e232f61 to your computer and use it in GitHub Desktop.
Save ValentaTomas/7db9cd6578b3ed8702f4f8332e232f61 to your computer and use it in GitHub Desktop.
Run Docker image with a mounted GCP credentials
#!/bin/sh
docker run -p 8000:80 \
-e GOOGLE_APPLICATION_CREDENTIALS=/path/to/creds/in/container.json \
-v $GOOGLE_APPLICATION_CREDENTIALS:/path/to/creds/in/container.json \
gcr.io/$PROJECT_ID/$IMAGE_ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment