From 213fa70e497cc2e1fd63c426b5efef2e08812d0a Mon Sep 17 00:00:00 2001 From: Fallen_Breath Date: Fri, 29 Dec 2023 01:47:11 +0800 Subject: [PATCH] extra image temp fix for py3.12 lz4, more temurin attemps --- .github/workflows/ci.yml | 2 +- src/Dockerfile-extra | 8 ++++++++ src/Dockerfile-liberica | 21 +++++++++------------ src/Dockerfile-temurin | 27 ++++++++++++--------------- src/Dockerfile-zulu | 21 +++++++++------------ 5 files changed, 39 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65958dd..9a0b46c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: Docker images -run-name: Images CI for "${{ inputs.base_image_tags || github.event.client_payload.base_image_tags }}" +run-name: Images CI for "${{ inputs.base_image_tags || github.event.client_payload.base_image_tags }}" ref ${{ github.event.client_payload.git_ref || 'N/A' }} on: workflow_dispatch: diff --git a/src/Dockerfile-extra b/src/Dockerfile-extra index a8a38c8..2fccaa4 100644 --- a/src/Dockerfile-extra +++ b/src/Dockerfile-extra @@ -8,6 +8,14 @@ set -e # disable the pip config temporary to install packages to the global storage export PIP_CONFIG_FILE=/dev/null +if python3 -V 2>&1 | grep -q "3.12."; then + if ! command -v gcc &> /dev/null; then + # lz4 doesn't have prebuilt wheels for py3.12 yet + # https://github.com/python-lz4/python-lz4/issues/274 + sed -i '/lz4/d' /requirements_common.txt + fi +fi + pip freeze | grep mcdreforged >> /requirements_common.txt pip3 install -r /requirements_common.txt diff --git a/src/Dockerfile-liberica b/src/Dockerfile-liberica index 2864ae4..b353f28 100644 --- a/src/Dockerfile-liberica +++ b/src/Dockerfile-liberica @@ -1,21 +1,18 @@ ARG BASE_IMAGE FROM ${BASE_IMAGE} -ARG JAVA +ARG JAVA=17 # https://docs.bell-sw.com/liberica-jdk/latest/general/install-guide/#linux RUN < /etc/apt/apt.conf.d/timeout_tweak.conf + +# hopefully this fixes the random connection error issue +# https://github.com/adoptium/installer/issues/766#issuecomment-1856884963 +cat < /etc/apt/apt.conf.d/timeout_tweak.conf Acquire::http::Timeout "30"; Acquire::http::ConnectionAttemptDelayMsec "2000"; Acquire::https::Timeout "30"; @@ -20,14 +20,11 @@ Acquire::ftp::ConnectionAttemptDelayMsec "2000"; Acquire::Retries "15"; EOF - apt-get update - apt-get install --no-install-recommends -y gnupg ca-certificates curl - curl -so- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor -o /etc/apt/trusted.gpg.d/adoptium.gpg - echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list - apt-get update - apt-get install --no-install-recommends -y "temurin-${JAVA}-jdk" - rm -rf /var/lib/apt/lists/* /etc/apt/apt.conf.d/timeout_tweak.conf -else - exit 1 -fi +apt-get update +apt-get install -y gnupg ca-certificates curl +curl -so- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor -o /etc/apt/trusted.gpg.d/adoptium.gpg +echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list +apt-get update +apt-get install -y "temurin-${JAVA}-jdk" +rm -rf /var/lib/apt/lists/* /etc/apt/apt.conf.d/timeout_tweak.conf EOT diff --git a/src/Dockerfile-zulu b/src/Dockerfile-zulu index 1f498e3..074e647 100644 --- a/src/Dockerfile-zulu +++ b/src/Dockerfile-zulu @@ -1,21 +1,18 @@ ARG BASE_IMAGE FROM ${BASE_IMAGE} -ARG JAVA +ARG JAVA=17 # https://docs.azul.com/core/install/debian#install-from-azul-apt-repository RUN <