基于Alpine制作精简镜像#jre_8u202

sam 2023年01月17日 160次浏览

java基础docker镜像精简

jre包

jre-8u202-linux-x64.tar.gz

(可选)精简jre_8u202

rm -rf ./lib/plugin.jar \
./lib/ext/jfxrt.jar \
./bin/javaws \
./lib/javaws.jar \
./lib/desktop \
./plugin \
./lib/deploy* \
./lib/*javafx* \
./lib/*jfx* \
./lib/amd64/libdecora_sse.so \
./lib/amd64/libprism_*.so \
./lib/amd64/libfxplugins.so \
./lib/amd64/libglass.so \
./lib/amd64/libgstreamer-lite.so \
./lib/amd64/libjavafx*.so \
./lib/amd64/libjfx*.so

Dockerfile

# syntax=docker/dockerfile:1
FROM frolvlad/alpine-glibc:latest
ADD jre /usr/local/
ENV JAVA_HOME /usr/local/jre
ENV PATH ${PATH}:${JAVA_HOME}/bin