Docker¶
Publish Docker to AWS¶
- Go to Amazon ECS
- Select Repositories
- Select a repository or create
- Select push Commands
- Follow the push Commands or follow:
- Go to the root directory containing Dockerfile
- Run
aws ecr get-login --region us-west-2
- Run the docker login command
- Run
docker build -t {repo-name}:{latest/dev/stage/prod} .
- Run
docker tag {repo-name}:{latest/dev/stage/prod} {amazon-repo}:{latest/dev/stage/prod}
- Run
docker push {amazon-repo}:{latest/dev/stage/prod}
Publish Docker to DockerHub¶
- Go to the root directory containing Dockerfile
- Run
docker login
- Run
docker build -t {repo-name}:{latest/dev/stage/prod} .
- Run
docker push {repo-name}:{latest/dev/stage/prod}
Docker Commands¶
To update a docker image, please follow publish to Aws or DockerHub