JDK8基础镜像包
运行命令
docker build -t registry.cn-shanghai.aliyuncs.com/bookc/openjdk-8-alpine .
dockerfile
FROM openjdk:8-jdk-alpine #指定阿里镜象 RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories #设置时区 RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone #增加字体,解决验证码没有字体报空指针问题 RUN set -xe && apk --no-cache add ttf-dejavu fontconfig #安装curl RUN apk add --no-cache curl #安装bash RUN apk add --no-cache --upgrade bash #jmx_exporter COPY ../jmx_exporter/ /root/data/soft/jmx_exporter/ # 安装字体 RUN mkdir -p /usr/share/fonts/chinese/TrueType/ COPY simsun.ttc /usr/share/fonts/chinese/TrueType/ COPY simsun.ttf /usr/share/fonts/chinese/TrueType/ # jre替换local_policy.jar和US_export_policy.jar JCE无限制权限策 COPY UnlimitedJCEPolicyJDK8/local_policy.jar /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/policy/limited/local_policy.jar COPY UnlimitedJCEPolicyJDK8/US_export_policy.jar /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/policy/limited/US_export_policy.jar COPY UnlimitedJCEPolicyJDK8/local_policy.jar /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/policy/unlimited/local_policy.jar COPY UnlimitedJCEPolicyJDK8/US_export_policy.jar /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/policy/unlimited/US_export_policy.jar
文件路径
dockerfile: 项目常用dockefile (gitee.com)