Tomcat container on article has been done and the webapps.dist delete webapps webapps directory name into the operation, the normal access
so when we want to generate a new image based on this tomcat container, container generated this image there will be no webapps.dist this directory does not need to make any modification to a successful visit.
The figure may know by id tomcat container is c2de5293a386, so to generate a new image by the following command:
docker commit -a="jiejie" -m="tomcat without webapps.dist" c2de5293a386 mytomcat:1.0
-a: name defines OF
-m: described
later is to generate the image name and the container id + version number corresponding mirror
This is to generate a return to the id mirror, docker images look:
new image already exists
The next direct use of the new image is generated tomcat container, without any modification of file:
docker run -it -p 8888:8080 mytomcat:1.0
tomcat next visit, a bit long, be patient, eventually visit a success:
to sum up
If you are not satisfied with the current image, can modify according to their own want to do, then the modified container modeled to generate a new image, followed by the new image to generate container ok.