Dockerfile内容如下:
FROM eclipse-temurin:8-jre-alpine MAINTAINER devops([email protected]) RUN apk update && apk --no-cache add tzdata ttf-dejavu fontconfig \ && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ && echo "Asia/Shanghai" > /etc/timezone ENV LANG=en_US.UTF-8 \ LANGUAGE=en_US.UTF-8 RUN mkdir -p $JAVA_HOME/lib/fonts/fallback/ \ && cd $JAVA_HOME/lib/fonts/fallback/ \ && wget http://b.pig4cloud.com/SIMSUN.TTC RUN mkdir -p /data/server RUN addgroup -g 8080 -S app \ && adduser app -h /data/server -D -G app -u 8080 -s /bin/sh USER app WORKDIR /data/server
备注:增加时区、字体、非root用户
标签:en,RUN,OpenJDK,server,&&,java,data,app,Alpine From: https://www.cnblogs.com/a120608yby/p/16880589.html