Finally, push the image to the Docker registry. So, let's create an image on the local Ubuntu machine:
$ sudo docker run -t -i ubuntu /bin/bash root@9593c56f9e70:/# echo "TEST" >/mydockerimage root@9593c56f9e70:/# exit $ sudo docker commit $(sudo docker ps -lq) vinod-image e17b685ee6987bb0cd01b89d9edf81a9fc0a7ad565a7e85650c41fc7e5c0cf9e
Let's log in to the Docker registry created locally on the Ubuntu machine:
$ sudo docker --insecure-registry=mydomain.com:8080 \ login https://mydomain.com:8080 Username: vinod1 Password: Email: [email protected] Login Succeeded
Tag the image before pushing it to the registry:
$ sudo docker tag vinod-image mydomain.com:8080/vinod-image
Finally, use the push
command to upload the image:
$ sudo docker push \ mydomain.com:8080/vinod-image The push refers to a repository [mydomain.com :8080/vinod-image] (len: 1) Sending image list Pushing repository mydomain.com:8080/vi nod-image (1 tags) 511136ea3c5a...