Last active
January 18, 2019 07:22
-
-
Save ResidentMario/ecd4359b6cd4e6e936a57be12ed41a10 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
# construct the ECR name. | |
account=$(aws sts get-caller-identity --query Account --output text) | |
region=$(aws configure get region) | |
fullname="${account}.dkr.ecr.${region}.amazonaws.com/quiltdata/sagemaker-demo:latest" | |
# create the repository in ECR. | |
aws ecr create-repository --repository-name "quiltdata/sagemaker-demo" > /dev/null | |
# Get the login command from ECR and execute it directly | |
$(aws ecr get-login --region ${region} --no-include-email) | |
# Build the docker image, tag it with the full name, and push it to ECR | |
docker build -t "quiltdata/sagemaker-demo" quilt-sagemaker-demo/ | |
docker tag "quiltdata/sagemaker-demo" ${fullname} | |
docker push ${fullname} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment