Skip to content

Commit 625441d

Browse files
TeslaCNyu199195
andauthored
Optimize layers of shenyu-admin Docker image (#4962)
Co-authored-by: xiaoyu <[email protected]>
1 parent defb046 commit 625441d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

shenyu-dist/shenyu-admin-dist/docker/Dockerfile

+9-4
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,23 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
FROM openjdk:8-jre-alpine
17+
FROM alpine AS prepare
1818

1919
ARG APP_NAME
2020

2121
ENV LOCAL_PATH /opt/shenyu-admin
22-
ENV ADMIN_JVM ""
23-
24-
RUN apk --no-cache add procps
2522

2623
ADD target/${APP_NAME}.tar.gz /opt
2724
RUN mv /opt/${APP_NAME} ${LOCAL_PATH}
2825

26+
FROM openjdk:8-jre-alpine
27+
28+
RUN apk --no-cache add procps
29+
30+
ENV LOCAL_PATH /opt/shenyu-admin
31+
ENV ADMIN_JVM ""
32+
33+
COPY --from=prepare ${LOCAL_PATH} ${LOCAL_PATH}
2934
COPY docker/logback.xml ${LOCAL_PATH}/conf/logback.xml
3035
COPY docker/entrypoint.sh ${LOCAL_PATH}/entrypoint.sh
3136
RUN chmod +x ${LOCAL_PATH}/entrypoint.sh

0 commit comments

Comments
 (0)