FROM *.*.com//centos7:v3 # 将编译生成的jar包拷贝到镜像中 COPY ./git-resource/purchase-api/target/*.jar /api.jar COPY ./config/run.sh /run.sh # 时区 ENV TZ Asia/Shanghai RUN ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ && echo ${TZ} > /etc/timezone # 设置容器启动命令 CMD ["bash","/run.sh"]
#!/bin/bash source /etc/profile export LANG=zh_CN.UTF-8 export LC_ALL=zh_CN.UTF-8 echo "export LANG=zh_CN.UTF-8" >> /root/.bashrc echo "export LC_ALL=zh_CN.UTF-8" >> /root/.bashrc exec java -Djava.security.egd=file:/dev/./urandom -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=utf-8 -jar /api.jar
标签:容器,UTF,CN,jar,api,export,zh From: https://www.cnblogs.com/litzhiai/p/17656826.html