- Create the repo:
aws ecr create-repository --repository-name fitcartographer-ui
- For ease of use, tag the local image with your ecr url:
docker tag fitcartographer-ui:latest 059039070213.dkr.ecr.us-east-1.amazonaws.com/fitcartographer-ui
- Push to repo
docker push 059039070213.dkr.ecr.us-east-1.amazonaws.com/jcp-ui
- Deploy to EC2 and run it https://medium.com/@meetakoti.kirankumar/deploying-fastapi-web-application-in-aws-a1995675087d
- push to github
- rebuild image locally
- push image to ECR
- log into ec2 instance
- stop & rm the container
- pull new image
- restart container
docker pull 059039070213.dkr.ecr.us-east-1.amazonaws.com/jcp-ui
docker run --name jcp-ui -d -p 3000:8080 059039070213.dkr.ecr.us-east-1.amazonaws.com/jcp-ui
docker exec -it jcp-ui /bin/sh
docker stop jcp-ui
docker rm jcp-ui