Add the following sentence to the Dockerfile (the part marked in red):
FROM xxxxxx
ENV JAVA_OPTS="-Dfile.encoding=UTF-8"
ENV TZ=Asia/Shanghai
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone