Test: Use docker run tomcat container

1. Download tomcat 

pull Tomcat Docker 
# do not add the version number, the default download the latest version

2. View Mirror downloaded tomcat

ImagesRF Royalty Free Docker 
# View all mirrors

 

 

 

 3. boot image

RUN --name TOM1 -d -p Docker 80: 8080 Tomcat 
# for the convenience of subsequent operations, the container named TOM1

4. Check the operation of the vessel

docker ps 

Results shown in Figure

 

 

Input host ip, the results page screenshot

 

 

 

4 into the interior mirror

docker exec -it tom1 /bin/bash

5. Advanced play: Modify go to our homepage

webapps cd / ROOT 
RM -f index.jsp 
echo "Brother, sister, Happy New Year"> index.html 
# Create a new file and write the contents

Results shown in Figure

 

 6. The container revised submission for private Mirror

Compared

Using the official mirror effect

 

 

Private mirror effect to create their own

 

Guess you like

Origin www.cnblogs.com/hetang5250/p/12497912.html