echo "执行容器启动"; docker stop java-web; if [ $? -ne 0 ]; then echo "未发现需要删除的容器"; else docker rm java-web; fi docker run -it -d -m 700m --memory-reservation 350m --restart=always --name=java-web -v /home/ppp:/home/ppp --privileged=true --net=host -p xxxx:xxxx centosjdk:v1 java -jar -Duser.timezone=GMT+08 /home/ppp/project-0.0.1.jar; if [ $? -ne 0 ]; then echo "启动server服务器失败"; fi
|