Commit ff4e4892 by zhangxingmin

push

parent 70c04f5c
# 基础镜像 # 基础镜像
FROM openjdk:8-jre-slim FROM openjdk:8-jre-slim
# 使用 alpine 以获得更小的镜像
FROM openjdk:8-jdk-alpine
# 维护人 # 维护人
LABEL maintainer="zxm<2060197959@qq.com>" LABEL maintainer="zxm<2060197959@qq.com>"
...@@ -15,7 +13,6 @@ ENV LANG=zh_CN.UTF-8 \ ...@@ -15,7 +13,6 @@ ENV LANG=zh_CN.UTF-8 \
# 1. 更新源(这层很少变化,缓存利用率高) # 1. 更新源(这层很少变化,缓存利用率高)
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \ RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
TZ=Asia/Shanghai
# 2. 更新包列表(单独一层) # 2. 更新包列表(单独一层)
RUN apt-get update RUN apt-get update
...@@ -26,9 +23,6 @@ RUN apt-get install -y --no-install-recommends \ ...@@ -26,9 +23,6 @@ RUN apt-get install -y --no-install-recommends \
fonts-dejavu-core \ fonts-dejavu-core \
fonts-wqy-microhei \ fonts-wqy-microhei \
fonts-noto-cjk \ fonts-noto-cjk \
# 安装基础依赖和字体(alpine 使用 apk)
RUN apk add --no-cache \
tzdata \
fontconfig \ fontconfig \
locales && \ locales && \
echo "zh_CN.UTF-8 UTF-8" >> /etc/locale.gen && \ echo "zh_CN.UTF-8 UTF-8" >> /etc/locale.gen && \
...@@ -40,13 +34,6 @@ RUN apt-get install -y --no-install-recommends \ ...@@ -40,13 +34,6 @@ RUN apt-get install -y --no-install-recommends \
libreoffice-core \ libreoffice-core \
libreoffice-writer \ libreoffice-writer \
libreoffice-l10n-zh-cn libreoffice-l10n-zh-cn
ttf-dejavu \
ttf-liberation \
ttf-wqy-microhei \
libreoffice \
libreoffice-lang-zh_cn && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/localtime && \
mkdir -p /home/app
# 5. 清理 # 5. 清理
RUN apt-get clean && \ RUN apt-get clean && \
...@@ -60,4 +47,4 @@ WORKDIR /home/app ...@@ -60,4 +47,4 @@ WORKDIR /home/app
COPY target/yd-oss-api-1.0-SNAPSHOT-exec.jar /home/app/yd-oss-api.jar COPY target/yd-oss-api-1.0-SNAPSHOT-exec.jar /home/app/yd-oss-api.jar
ENTRYPOINT ["java", "-jar", "/home/app/yd-oss-api.jar"] ENTRYPOINT ["java", "-jar", "/home/app/yd-oss-api.jar"]
EXPOSE 9106 EXPOSE 9106
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment