Skip to content

Instantly share code, notes, and snippets.

@bbuechler
bbuechler / easy_patch.sh
Last active January 3, 2023 16:16
Quick and easy way to patch an ECR container without rebuilding
ECR_REG=12345678910.dkr.ecr.us-west-2.amazonaws.com
ECR_REPO=my_app
ECR_TAG=tag_name
RUN_NAME=${ECR_REPO}_new
# login to ECR
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin $ECR_REG
# Start container
docker run --detach --name $RUN_NAME $ECR_REG/$ECR_REPO:$ECR_TAG tail -f /dev/null