12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- FROM openjdk:8-jre-alpine
- ENV LANG=en_US.UTF-8 \
- LANGUAGE=en_US:en \
- LC_ALL=en_US.UTF-8 \
- GLIBC_BASE_URL=https://github.com/sgerrand/alpine-pkg-glibc/releases/download \
- GLIBC_PACKAGE_VERSION=2.31-r0 \
- USER_HOME_DIR="/root"
- #5.更新Alpine的软件源为阿里云,因为从默认官源拉取实在太慢了
- RUN echo http://mirrors.aliyun.com/alpine/v3.10/main/ > /etc/apk/repositories && \
- echo http://mirrors.aliyun.com/alpine/v3.10/community/ >> /etc/apk/repositories
- RUN apk update && apk upgrade
- RUN apk add --no-cache tzdata && \
- cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
- echo "Asia/Shanghai" > /etc/timezone && \
- apk del tzdata
- RUN apk add --update ttf-dejavu fontconfig
- RUN apk add --no-cache ca-certificates bash git openssh zip subversion sshpass curl
- RUN apk add --no-cache --virtual=build-dependencies wget \
- && ALPINE_GLIBC_BASE_URL="${GLIBC_BASE_URL}/${GLIBC_PACKAGE_VERSION}" \
- && ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-${GLIBC_PACKAGE_VERSION}.apk" \
- && ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-${GLIBC_PACKAGE_VERSION}.apk" \
- && ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-${GLIBC_PACKAGE_VERSION}.apk" \
- && cd /tmp \
- && wget -q -O "/etc/apk/keys/sgerrand.rsa.pub" "https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub" \
- && wget "${ALPINE_GLIBC_BASE_URL}/${ALPINE_GLIBC_BASE_PACKAGE_FILENAME}" \
- "${ALPINE_GLIBC_BASE_URL}/${ALPINE_GLIBC_BIN_PACKAGE_FILENAME}" \
- "${ALPINE_GLIBC_BASE_URL}/${ALPINE_GLIBC_I18N_PACKAGE_FILENAME}" \
- && apk add --no-cache \
- "${ALPINE_GLIBC_BASE_PACKAGE_FILENAME}" \
- "${ALPINE_GLIBC_BIN_PACKAGE_FILENAME}" \
- "${ALPINE_GLIBC_I18N_PACKAGE_FILENAME}" \
- && /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 \
- && apk del build-dependencies \
- && rm -rf /etc/apk/keys/sgerrand.rsa.pub \
- && rm -rf /tmp/*
- RUN apk add --update --no-cache ttf-dejavu fontconfig && rm -rf /var/cache/apk/*
- RUN java -version
|