Sharing Docker Images on Docker Hub

⭐️ 👀 2023 WEB DEVELOPMENT BOOTCAMP starting in days! Join the waiting list to reserve your spot in my 10-weeks cohort course and learn the fundamentals, HTML, CSS, JS, Tailwind, React, Next.js and much much more! 👀 ⭐️

An image like the one we created in the Node.js Hello World Docker Container from scratch post is simple, yet it’s a perfect example to try one of the cool features of Docker, provided through Docker Hub, the official hosting service of public and private Docker Images.

Before we can do that, however, we need to register on Docker Hub.

Docker Hub is free in its basic plan which includes unlimited public repos and one private repo. For more than that, there are paid plans.

Once you register and login, you will see your dashboard:

Now using your username, you need to login from the command line using docker login:

docker login --username <username>

Now you can use docker tag to create the image, and docker push to push it to Docker Hub:

docker tag <image> <username>/<tagname>
docker push <username>/<tagname>

If you forget to login, you will get a denied: requested access to the resource is denied error message when you run docker push.

Now you should see your image on the repositories list in Docker Hub:

Click on it to reveal more details:

Now since the image is public, everyone can use it to create their own containers, or use it as a base image.

You can now create a new tag, making a new version of the image, and there’s a lot more you can do that I won’t go into now, like:

  • automated builds of images from external repositories (like GitHub)
  • running automated tests
  • setting up webhooks to perform any action when a repository image is updated
  • creating organizations and teams within them

One more thing! ⚠️ ✋

At the end of January I will organize the Web Development Bootcamp.

It's a 10-weeks long cohort online course where I will guide you to becoming a Web Developer.

It's not "just a course". It's a big event I organize once a year.

We'll start from zero, learn the fundamentals of Web Development, HTML CSS, JavaScript, Tailwind, Git, using the command line, VS Code, GitHub, Node.js, we'll then learn React, JSX, how to use PostgreSQL, Astro, Next.js, Prisma, deploying on Netlify/DigitalOcean/Fly/Vercel and much more! 

At the end of the first 10 weeks you'll know how to create web sites and web applications and I'll unlock you the 2nd phase of the Bootcamp: you will get access to a large number of projects exclusive to the Bootcamp graduates, so you can follow my instructions to build things like private areas with authentication, clones of popular sites like Twitter YouTube Reddit, create e-commerce sites, and much much more.

Because once you got the fundamentals, you only learn by working on real, exciting projects.

To find out more, visit