##拉镜像
docker pull tomcat:7.0.57-jre7
##运行镜像,使用自己的djk、tomcat相关配置文件
docker run -d -e TZ="Asia/Shanghai" -p 9999:8080 --name tomcat -e LANG="C.UTF-8" -v /home/cjgk/data:/data -v /usr/java:/usr/java -v /home/docker/tomcat7/webapps:/usr/local/tomcat/webapps -v /home/docker/tomcat7/logs:/usr/local/tomcat/logs -v /home/docker/tomcat7/conf:/usr/local/tomcat/conf -v /home/docker/tomcat7/bin:/usr/local/tomcat/bin --privileged=true tomcat:7.0.57-jre7
##查看日志
docker logs --tail=100 -f tomcat
从主机复制到容器sudo docker cp host_path containerID:container_path
从容器复制到主机sudo docker cp containerID:container_path host_path
docker run -d -e TZ="Asia/Shanghai" -p 8088:8080 --name nkcjapp -e LANG="C.UTF-8" -v /home/cjgk/data:/data -v /usr/java:/usr/java -v /home/docker/nkcjapp/webapps:/usr/local/tomcat/webapps -v /home/docker/nkcjapp/logs:/usr/local/tomcat/logs -v /home/docker/nkcjapp/conf:/usr/local/tomcat/conf -v /home/docker/nkcjapp/bin:/usr/local/tomcat/bin --privileged=true tomcat:7.0.57-jre7
docker run -d -e TZ="Asia/Shanghai" -p 8090:8080 --name nkhtapp -e LANG="C.UTF-8" -v /home/cjgk/data:/data -v /usr/java:/usr/java -v /home/docker/nkhtapp/webapps:/usr/local/tomcat/webapps -v /home/docker/nkhtapp/logs:/usr/local/tomcat/logs -v /home/docker/nkhtapp/conf:/usr/local/tomcat/conf -v /home/docker/nkhtapp/bin:/usr/local/tomcat/bin --privileged=true tomcat:7.0.57-jre7