docker:images:update_and_commit_an_image
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
docker:images:update_and_commit_an_image [2020/11/11 10:12] – 192.168.1.1 | docker:images:update_and_commit_an_image [2020/11/11 10:25] (current) – 192.168.1.1 | ||
---|---|---|---|
Line 93: | Line 93: | ||
ubuntu | ubuntu | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Log in to the Docker Hub ===== | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE:** In order to work with the Docker Hub, you will need to create an account on [[https:// | ||
+ | </ | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | docker login | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | Username: peter | ||
+ | Password: | ||
+ | WARNING! Your password will be stored unencrypted in / | ||
+ | Configure a credential helper to remove this warning. See | ||
+ | https:// | ||
+ | |||
+ | Login Succeeded | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Tag the Image to push to the Docker Hub ===== | ||
+ | |||
+ | For example, to tag the nginx-instance image: | ||
+ | |||
+ | <code bash> | ||
+ | docker tag 12cefc9b5362 peter/ | ||
+ | </ | ||
+ | |||
+ | where: | ||
+ | |||
+ | * 12cefc9b5362 is the ID of the nginx-instance image. | ||
+ | * peter is your Docker Hub username. | ||
+ | * nginx-instance is the name of the image that you want to push. | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Verify the Tagged Image ===== | ||
+ | |||
+ | <code bash> | ||
+ | docker images | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | REPOSITORY | ||
+ | peter/ | ||
+ | nginx-instance | ||
+ | ubuntu | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Push the new Image to the Docker Hub ===== | ||
+ | |||
+ | Push the new image named peter/ | ||
+ | |||
+ | <code bash> | ||
+ | docker push peter/ | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Login to the Docker Hub ===== | ||
+ | |||
+ | Login to the Docker Hub using your web browser and verify that the nginx-instance image appears in the Repositories. | ||
+ | |||
docker/images/update_and_commit_an_image.1605089579.txt.gz · Last modified: 2020/11/11 10:12 by 192.168.1.1