基于alpine完成oracle jdk8
作者:互联网
1.dockerfile
FROM alpine:3.10
### 下载地址 https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
COPY sgerrand.rsa.pub /etc/apk/keys
### 下载地址 https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.29-r0/glibc-2.29-r0.apk
COPY glibc-2.29-r0.apk .
ADD jdk-8u321-linux-x64.tar.gz /usr/local
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk update && apk upgrade \
&& apk --no-cache add tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk --no-cache add ca-certificates wget \
&& apk add glibc-2.29-r0.apk \
&& apk del tzdata \
&& rm -rf /var/cache/apk/* glibc-2.29-r0.apk
ENV JAVA_HOME /usr/local/jdk1.8.0_321
ENV JRE_HOME /usr/local/jdk1.8.0.321/jre
ENV CLASSPATH .:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
ENV PATH $PATH:$JAVA_HOME/bin:$JRE_HOME/bin
2.Alpine镜像中Gnu Libc的设定方法
步骤1: 下载key
wget https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
步骤2: 下载apk安装文件
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.29-r0/glibc-2.29-r0.apk
步骤2: 安装
apk add glibc-2.29-r0.apk
源链接: https://blog.csdn.net/liumiaocn/article/details/89703177
标签:sgerrand,2.29,r0,glibc,apk,jdk8,&&,oracle,alpine 来源: https://www.cnblogs.com/Applogize/p/16342216.html