Think of Docker Hub being to docker what Github is to source control systems for git
Docker Hub is the central repository or "store" for sharing images.
Private Repositories for Docker Hub are also available to store images:
- AWS Container Registry
- Azure Container Registry
- Artifactory (paid) When inside a firewall
- Nexus (free) for on-premise Docker repositories.
Throughout the workshop we used docker pull SOME_IMAGE
and each time we did this we pulled content from docker hub.
- Browse https://hub.docker.com/ to find other images to download.
- Browse Docker Store as the new image explorer
- Each image usually has a Dockerfile showing how that image was built and instructions on using the image.
- Environment variables to set and more
(You can use AWS, Azure, or other private registries if you want to keep private images)
-
Create an account on https://hub.docker.com/.
-
Run
docker login
in order to login into the hub and push images. -
Note the profile picture section has your username as well as
My Profile
,Logout
and more sections. -
Tag an image in the form
username/imagename:version
- Notice I tag my images with
jbelmont/someimage
: - Remember we tagged an image like this
docker tag hello-world jbelmont/hello-world
- Note the registry details are in the image name.
- This makes it more difficult to move images between repositories or to build automation though
- Notice I tag my images with
-
docker push username/imagename:version
substituting the details of the image you tagged above.docker push jbelmont/hello-world
we pushed our newly tagged image with this command
Previous | Next |
---|---|
← Docker Swarm | Continuous Integration → |