添加以下环境变量
ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8
DockerFile 为
FROM java:8 ADD app-0.0.1-SNAPSHOT.jar /tmp/app-0.0.1-SNAPSHOT.jar VOLUME /tmp ENV LANG C.UTF-8 ENV LANGUAGE zh_CN.UTF-8 ENV LC_ALL C.UTF-8 ENV TZ Asia/Shanghai EXPOSE 8081 ENTRYPOINT ["java","-jar","/tmp/app-0.0.1-SNAPSHOT.jar"]