After the image is built successfully, it can be used as long as there is a Docker environment, but the image must be pushed to Docker Hub. The image we created previously does not meet the tag requirements of Docker Hub. Because the username registered in Docker Hub is boonyadocker instead of boonya, the docker tag needs to be modified, and finally the docker push command is used to push the image to the public repository. Docker hub registered user Go to the official website to register an account: https://hub.docker.com/ Log in to docker in local Linux: docker login Enter your username and password to log in: docker@default:~$ docker login Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one. Username: boonyadocker Password: Login Succeeded docker@default:~$ tag to modify the image name The specifications for pushing images are: docker push registered username/image name The tag command is modified to a standard image: docker tag boonya/tomcat-allow-remote boonyadocker/tomcat-allow-remote View the modified specification image: docker@default:~$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE boonyadocker/tomcat-allow-remote latest 6137f64875dd 7 hours ago 571MB boonyadocker/tomcat-web latest 09677d05b579 2 days ago 571MB <none> <none> e1471ab1845a 3 days ago 188MB <none> <none> cf240e31edfb 3 days ago 188MB <none> <none> 717961796ae2 3 days ago 334MB apptomcat 1.0 249dc3f5dfb0 3 days ago 334MB tomcat 8 a2fbbcebd67e 8 days ago 334MB ubuntu 14.04 4a2820e686c4 2 weeks ago 188MB wurstmeister/kafka latest 12453f4efa7b 6 weeks ago 265MB docker@default:~$ Push the image to Docker Hub Push the image using the push command: docker push boonyadocker/tomcat-allow-remote:latest Note: Pushing to Docker Hub is very slow, so please be patient. It is likely to fail. If it fails, the server will try to retransmit multiple times and then disconnect the push (but the files that have been pushed will be retained, but it is unknown how long they will be retained). Here is the output after the upload is complete (multiple retransmissions): docker@default:~$ docker push boonyadocker/tomcat-allow-remote:latest The push refers to a repository [docker.io/boonyadocker/tomcat-allow-remote] 464a44ea0195: Layer already exists 29b57e33a4da: Pushed d649a240e453: Layer already exists d0757a6730d0: Layer already exists 768dcfe5d05f: Layer already exists f5cfc06b640d: Layer already exists 9669d6b73383: Layer already exists latest: digest: sha256:1e7562a15ef1728f213922d9633be67f3025447d0a641e333a8ec5107749c386 size: 11802 docker@default:~$ Patience is still required because large files are time-consuming. Visit Docker Hub to publish images After uploading, visit: https://hub.docker.com/r/boonyadocker/tomcat-allow-remote/, as shown in the figure below, everyone can use the image I released: You can also search for it on Docker Hub: So far we have published our own image to the Docker Hub repository. Docker uses published images Search for published images: docker@default:~$ docker search boonyadocker/tomcat-allow-remote NAME DESCRIPTION STARS OFFICIAL AUTOMATED boonyadocker/tomcat-allow-remote In this Tomcat image server you can use ma... 0 docker@default:~$ Because we have published our own image, we can directly use the docker pull command to pull and use the image in the future: docker pull boonyadocker/tomcat-allow-remote Note: The image is based on the remote management role permissions of Tomcat8. The management account and password are: tomcat/password. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: mysql installer web community 5.7.21.0.msi installation graphic tutorial
>>: MySQL 5.7 zip archive version installation tutorial
Table of contents 01 Background 02 Introduction 0...
Table of contents What is a container data volume...
Table of contents 1. Error message 2. Cause of er...
What we are simulating now is a master-slave syst...
1. Server setup The remote repository is actually...
When using the docker-maven-plugin plug-in, Maven...
This old question has troubled countless front-end...
Why use prettier? In large companies, front-end d...
Table of contents 1. Truncate operation 1.1 What ...
Table of contents What is front-end routing? How ...
A few months after entering the industry in 2005, ...
DTD is a set of grammatical rules for markup. It i...
Custom Image FAQ How to view the data disk? You c...
1. Background The company's projects have alw...
ylbtech_html_print HTML print code, support page t...