Skip to content

Latest commit

 

History

History
19 lines (17 loc) · 851 Bytes

README.md

File metadata and controls

19 lines (17 loc) · 851 Bytes

#Dockerhub

Docker hub is a hosted repository for all your docker images. It's possible to both use public and private repos, just like github!

  1. First we need to go to http://hub.docker.com and create a user.
  2. Then we need to login inside our docker host with that user.
docker login
  1. When you are logged in, it's now possible to get access to your repository.
docker push <username>/<repo>:[tag]
  1. Before we can actually push the image we have to build it in a special way, we need to name it <username>/<repo>:[tag], so we need to rebuild our image to be pushed to Docker Hub.
  2. So just like we did previously, we run docker build, this time just with another name of the image. docker build -t <username>/<repo>:[tag] .
  3. And now we can push it to the Docker Hub.
  4. docker push <username>/<repo>:[tag]