🔧 优化 Dockerfile,减少层数

WORKDIR 可以自动创建文件夹,无需执行 mkdir 命令
This commit is contained in:
徐晓伟 2023-08-24 12:52:15 +08:00
parent 2b4134a1e4
commit 2c17c684c0
7 changed files with 0 additions and 14 deletions

View File

@ -1,7 +1,5 @@
FROM alibabadragonwell/dragonwell:17-anolis FROM alibabadragonwell/dragonwell:17-anolis
RUN mkdir -p /pig-auth
WORKDIR /pig-auth WORKDIR /pig-auth
ARG JAR_FILE=target/pig-auth.jar ARG JAR_FILE=target/pig-auth.jar

View File

@ -1,7 +1,5 @@
FROM alibabadragonwell/dragonwell:17-anolis FROM alibabadragonwell/dragonwell:17-anolis
RUN mkdir -p /pig-gateway
WORKDIR /pig-gateway WORKDIR /pig-gateway
ARG JAR_FILE=target/pig-gateway.jar ARG JAR_FILE=target/pig-gateway.jar

View File

@ -1,7 +1,5 @@
FROM alibabadragonwell/dragonwell:17-anolis FROM alibabadragonwell/dragonwell:17-anolis
RUN mkdir -p /pig-register
WORKDIR /pig-register WORKDIR /pig-register
ARG JAR_FILE=target/pig-register.jar ARG JAR_FILE=target/pig-register.jar

View File

@ -1,7 +1,5 @@
FROM alibabadragonwell/dragonwell:17-anolis FROM alibabadragonwell/dragonwell:17-anolis
RUN mkdir -p /pig-upms-biz
WORKDIR /pig-upms-biz WORKDIR /pig-upms-biz
ARG JAR_FILE=target/pig-upms-biz.jar ARG JAR_FILE=target/pig-upms-biz.jar

View File

@ -1,7 +1,5 @@
FROM alibabadragonwell/dragonwell:17-anolis FROM alibabadragonwell/dragonwell:17-anolis
RUN mkdir -p /pig-codegen
WORKDIR /pig-codegen WORKDIR /pig-codegen
ARG JAR_FILE=target/pig-codegen.jar ARG JAR_FILE=target/pig-codegen.jar

View File

@ -1,7 +1,5 @@
FROM alibabadragonwell/dragonwell:17-anolis FROM alibabadragonwell/dragonwell:17-anolis
RUN mkdir -p /pig-monitor
WORKDIR /pig-monitor WORKDIR /pig-monitor
ARG JAR_FILE=target/pig-monitor.jar ARG JAR_FILE=target/pig-monitor.jar

View File

@ -1,7 +1,5 @@
FROM alibabadragonwell/dragonwell:17-anolis FROM alibabadragonwell/dragonwell:17-anolis
RUN mkdir -p /pig-quartz
WORKDIR /pig-quartz WORKDIR /pig-quartz
ARG JAR_FILE=target/pig-quartz.jar ARG JAR_FILE=target/pig-quartz.jar