DEV Community

Reishi Mitani
Reishi Mitani

Posted on

1 1

Pushing an Image to Docker Hub Repository

Login first.

$ docker login
Enter fullscreen mode Exit fullscreen mode

Check the container id for uploading.

$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                               NAMES
9dd3857e08fb        up_django           "python manage.py ru…"   36 hours ago        Up 2 minutes        80/tcp, 0.0.0.0:8000->8000/tcp      up_django_1
Enter fullscreen mode Exit fullscreen mode

We will push up_django.

$ docker commit 9dd3857e08fb up-django-container:ver-1
Enter fullscreen mode Exit fullscreen mode

We will attach a tag and remote repository name to the local repository image.

$ docker tag up-django-container:ver-1 USERNAME/up-django-container:ver-1
Enter fullscreen mode Exit fullscreen mode

Finally push the image.

$ docker push USERNAME/up-django-container:ver-1
Enter fullscreen mode Exit fullscreen mode

We will see the repository uploaded to on the online docker hub website.

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay