Skip to content

Commit

Permalink
Add more mirrors
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelWeezardo committed Mar 14, 2023
1 parent d2130dd commit 89f9d6e
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
4 changes: 4 additions & 0 deletions core/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#
FROM eclipse-temurin:17-jdk AS builder

COPY default/apt/sources.list.d /etc/apt/sources.list.d

RUN \
set -xeu && \
echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries && \
Expand All @@ -24,6 +26,8 @@ RUN \

FROM eclipse-temurin:17-jdk

COPY default/apt/sources.list.d /etc/apt/sources.list.d

RUN \
set -xeu && \
echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries && \
Expand Down
6 changes: 5 additions & 1 deletion core/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,23 @@ cp "$trino_client" "${WORK_DIR}/"
tar -C "${WORK_DIR}" -xzf "${WORK_DIR}/trino-server-${TRINO_VERSION}.tar.gz"
rm "${WORK_DIR}/trino-server-${TRINO_VERSION}.tar.gz"
cp -R bin "${WORK_DIR}/trino-server-${TRINO_VERSION}"
cp -R default "${WORK_DIR}/"
mkdir -p "${WORK_DIR}/default"
cp -R default/etc "${WORK_DIR}/default/"

TAG_PREFIX="trino:${TRINO_VERSION}"

for arch in "${ARCHITECTURES[@]}"; do
echo "🫙 Building the image for $arch"
mkdir -p "${WORK_DIR}/default/apt/sources.list.d"
cp "default/apt/sources.list.d/mirrors-$arch.sources" "${WORK_DIR}/default/apt/sources.list.d/"
docker build \
"${WORK_DIR}" \
--pull \
--platform "linux/$arch" \
-f Dockerfile \
-t "${TAG_PREFIX}-$arch" \
--build-arg "TRINO_VERSION=${TRINO_VERSION}"
rm -fr "${WORK_DIR}/default/apt/sources.list.d"
done

echo "🧹 Cleaning up the build context directory"
Expand Down
6 changes: 6 additions & 0 deletions core/docker/default/apt/sources.list.d/mirrors-amd64.sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enabled: yes
Types: deb
URIs: https://mirrors.ocf.berkeley.edu/ubuntu/ https://mirror.kumi.systems/ubuntu/
Suites: jammy jammy-updates jammy-backports jammy-security
Components: main restricted universe multiverse
Architectures: amd64
6 changes: 6 additions & 0 deletions core/docker/default/apt/sources.list.d/mirrors-arm64.sources
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enabled: yes
Types: deb
URIs: https://mirrors.ocf.berkeley.edu/ubuntu-ports/ https://mirror.kumi.systems/ubuntu-ports/
Suites: jammy jammy-updates jammy-backports jammy-security
Components: main restricted universe multiverse
Architectures: arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Enabled: yes
Types: deb
URIs: https://mirrors.ocf.berkeley.edu/ubuntu-ports/ https://mirror.kumi.systems/ubuntu-ports/
Suites: jammy jammy-updates jammy-backports jammy-security
Components: main restricted universe multiverse
# This is NOT a typo, Ubuntu calls "little endian" architecture "endian little"
Architectures: ppc64el

0 comments on commit 89f9d6e

Please sign in to comment.