Skip to content

Instantly share code, notes, and snippets.

@psoto
Created October 3, 2016 17:00
Show Gist options
  • Save psoto/512acd30e7961eec51f1a986ecfef25f to your computer and use it in GitHub Desktop.
Save psoto/512acd30e7961eec51f1a986ecfef25f to your computer and use it in GitHub Desktop.
Upload code to EB worker
# Login to AWS EC2 Container Registry
$(aws ecr get-login --region us-east-1)
# Generate tag
TAG=$(git rev-parse --short HEAD)
# Build, tag and upload image to AWS ECR
docker build -t worker .
docker tag worker:latest $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/worker:$TAG
docker push $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/worker:$TAG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment