#作者
MAINTAINER wuguang09
ADD jre1.8.0_371.tgz /usr/local/
RUN ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo 'Asia/Shanghai' >/etc/timezone && ln -sv /usr/local/jre1.8.0_371
/usr/local/jre
ENV JRE_HOME=/usr/local/jre1.8.0_371
ENV CLASS_PATH=.:${JRE_HOME}/lib:${CLASS_PATH}
ENV PATH=${JRE_HOME}/bin:${PATH}
WORKDIR /usr/local/
# 执行命令
#CMD ["java", "-version"]
# 构建镜像
docker build -f Dockerfile-jre -t xxxx/bu00xx_prod/alpine-jre8:rel-1.8.371 .
1、下载nacos-2.1.0软件包
Nacos官网:https://github.com/alibaba/nacos/releases/
2、修改application.properties
[root@vm-x.x.x nacos-2.1.0]# cat conf/application.properties
server.servlet.contextPath=/nacos
server.port=8848
# 修改
nacos.inetutils.prefer-hostname-over-ip=true
spring.datasource.platform=mysql
db.num=1
db.url.0=jdbc:mysql://${MYSQL_SERVICE_HOST}:${MYSQL_SERVICE_PORT}/${MYSQL_SERVIC
E_DB_NAME}?
characterEncoding=utf8&connectTimeout=10000&socketTimeout=30000&autoReconnect=tr
ue
db.user.0=${MYSQL_SERVICE_USER}
db.password.0=${MYSQL_SERVICE_PASSWORD}
# 不用动
db.pool.config.connectionTimeout=30000
db.pool.config.validationTimeout=10000
db.pool.config.maximumPoolSize=20
db.pool.config.minimumIdle=2
nacos.naming.empty-service.auto-clean=true
nacos.naming.empty-service.clean.initial-delay-ms=50000
nacos.naming.empty-service.clean.period-time-ms=30000
# 修改
management.endpoints.web.exposure.exclude=*
management.endpoints.enabled-by-default=false
# 不用动