1、编写Dockerfile文件
FROM openjdk:8 ENV TZ="Asia/Shanghai" ADD cim-gisportal.jar cim-gisportal.jar ADD nohup.out nohup.out ENTRYPOINT ["nohup","java","-jar","/cim-gisportal.jar","> nohup.out &"] EXPOSE 18204
2、镜像打包
docker build -t cim-gisportal .
3、镜像启动
docker run -d -p 18204:18204 --restart=always -e JAVA_OPTS='-Duser.timezone=GMT+08' -v /etc/localtime:/etc/localtime:ro --name cim-gisportal cim-gisportal
标签:启动,jar,cim,gisportal,nohup,docker,out From: https://www.cnblogs.com/hejj-bk/p/18008541