docker tomcat environment build

docker build -t repos_local/centos-jdk7-tomcat7:0.0.1 .
-t Set the tag name, naming rules registry/image:tag
. Indicates to use the Dockerfile file in the current directory


docker run -d -p 8081:8080 --name test-tomcat repos_local/centos-jdk7-tomcat7:0.0.1
-d run in the background
-p host port: container port port mapping
--name container name, you can operate on the container through the container name

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324747210&siteId=291194637