JDK8基礎映象包

bookc發表於2024-05-25

執行命令

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)

相關文章