Thursday, September 13, 2018

Image Tags

Image tags and upload to Docker Hub:

Tagging:
docker image tag (old way: docker tag)

docker pull mysql/mysql-server
belongs to mysql org.

tag: pointer to a specific image commit.

to create a new tag for an existing image.
docker image tag nginx orgname/nginx

it's just default to the "latest" tag.latest doesn't mean the latest one, it is the latest stable version.

it will show as a new image when we type ls comand.

now after creating the tag, just push the image to the hub.
docker image push orgname/nginx

you need to login, to push.
docker login

it stores the session key to .dcoker/config.json

later you can logout using
docker logout

to add an additional tag to the same image and call it "testing".
docker image tag orgname/nginx orgname/nginx:testing

insted of "latest", it is given tag "testing"



No comments:

Post a Comment