Login first.
$ docker login
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
We will push up_django
.
$ docker commit 9dd3857e08fb up-django-container:ver-1
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
Finally push the image.
$ docker push USERNAME/up-django-container:ver-1
We will see the repository uploaded to on the online docker hub website.
Top comments (0)