Publish a docker image
- 15 Feb 2023
- 1 Minute to read
- Print
- DarkLight
- PDF
Publish a docker image
- Updated on 15 Feb 2023
- 1 Minute to read
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
A docker image is published to a registry using 'docker push' command.
A docker registry must be created before you can publish images. Data Explorer currently supports DockerHub, and AWS ECR hosted registries. Please refer to the corresponding registry provider documentation on the steps to create a docker registry. After creating a docker registry, the same must be registered under the Docker Repositories page on Data Explorer UI.
Typical commands to push the docker image to the registry are listed below. Please refer to your registry provider documentation for additional details.
DockerHub
- Set credentials using the docker login command.Shell
docker login --username <username> --password <password>
- Push the docker image to the registry.Shell
docker push repo/img:latest
- For the above example, the docker image is expected to have been tagged with repo/img:latest during the 'docker build' or later using the 'docker tag' command.
AWS ECR
- Set credentials using the docker login command. The 'aws' command line and necessary permissions to perform get-login-password must have been setup before executing this command.Shell
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin <account>.dkr.ecr.us-east-1.amazonaws.com
- Push the docker image to the registry.Shell
docker push <account>.dkr.ecr.us-east-1.amazonaws.com/repo/img:latest
- For the above example, the docker image is expected to have been tagged with <account>.dkr.ecr.us-east-1.amazonaws.com/repo/img:latest during the 'docker build' or later using the 'docker tag' command.
Was this article helpful?