Skip to content

Instantly share code, notes, and snippets.

@allenday
Last active July 14, 2017 15:21
Show Gist options
  • Save allenday/0f5ab0dc6e924ba4611bf4c81991a7c3 to your computer and use it in GitHub Desktop.
Save allenday/0f5ab0dc6e924ba4611bf4c81991a7c3 to your computer and use it in GitHub Desktop.
Startup script for running bwa-http-docker container as a Google Compute Engine Instance Template.
#Startup script for running bwa-http-docker container as a Google Compute Engine Instance Template.
DOCKER_IMAGE=`wget --header 'Metadata-Flavor: Google' -O - -q 'http://metadata.google.internal/computeMetadata/v1/instance/attributes/DOCKER_IMAGE'`
BWA_FILES=`wget --header 'Metadata-Flavor: Google' -O - -q 'http://metadata.google.internal/computeMetadata/v1/instance/attributes/BWA_FILES'`
apt-get update && apt-get -y install docker.io
gcloud docker -- pull $DOCKER_IMAGE
docker run -P -e BWA_FILES=$BWA_FILES $DOCKER_IMAGE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment