tomcat证书tomcat.keystore在win生成后直接放入centos /opt/suwell/keys目录下供镜像中的tomcat挂载使用。
镜像启动:
docker run -d
-v /opt/suwell/keys:/opt/suwell
-v /opt/suwell/conf/server.xml:/opt/suwell/apache-tomcat-8.5.66/conf/server.xml
-p 8080:8080 -p 443:443
-p 镜像Id
server.xml配置:
<Connector port="443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/opt/suwell/tomcat.keystore"
keystorePass="123456"/>