Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
Fallen-Breath committed Dec 28, 2023
1 parent b641664 commit 2579d40
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/image_derivatives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
type: string
required: true

concurrency:
group: ${{ inputs.source_tag }}
cancel-in-progress: true

jobs:
extra:
uses: ./.github/workflows/image_one.yml
Expand All @@ -37,7 +41,7 @@ jobs:
uses: ./.github/workflows/image_one.yml
secrets: inherit
with:
job_name: OpenJDK (jdk${{ matrix.java }}, ${{ matrix.distribution }}${{ ', extra' && matrix.extra == 'true' || '' }})
job_name: OpenJDK (jdk${{ matrix.java }}, ${{ matrix.distribution }}${{ matrix.extra == 'true' && ', extra' || '' }})
dockerfile_name: Dockerfile-${{ matrix.distribution }}
build_args: |-
BASE_IMAGE=mcdreforged/${{ matrix.extra == 'true' && 'mcdreforged-extra' || 'mcdreforged' }}:${{ inputs.source_tag }}
Expand Down
14 changes: 13 additions & 1 deletion src/Dockerfile-temurin
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,25 @@ RUN <<EOT
set -e
export DEBIAN_FRONTEND="noninteractive"
if [ -n "$JAVA" ]; then
# hopefully this fixes the random connection error issue
# https://github.com/adoptium/installer/issues/766#issuecomment-1856884963
cat <<EOF > /etc/apt/apt.conf.d/timeout_tweak.conf
Acquire::http::Timeout "30";
Acquire::http::ConnectionAttemptDelayMsec "2000";
Acquire::https::Timeout "30";
Acquire::https::ConnectionAttemptDelayMsec "2000";
Acquire::ftp::Timeout "30";
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/*
rm -rf /var/lib/apt/lists/* /etc/apt/apt.conf.d/timeout_tweak.conf
else
exit 1
fi
Expand Down

0 comments on commit 2579d40

Please sign in to comment.