Skip to content

Commit f17c63b

Browse files
committed
ubunu: use close mirror
Signed-off-by: Anas Nashif <[email protected]>
1 parent 3f6f1bc commit f17c63b

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

Dockerfile.base

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
FROM ubuntu:24.04
44

5-
ARG USERNAME=user
65
ARG UID=1000
76
ARG GID=1000
7+
ARG USERNAME=user
88
ARG PYTHON_VENV_PATH=/opt/python/venv
99

1010
# this conflicts with uid 1000, remove it
@@ -16,6 +16,16 @@ SHELL ["/bin/bash", "-c"]
1616
# Set non-interactive frontend for apt-get to skip any user confirmations
1717
ENV DEBIAN_FRONTEND=noninteractive
1818

19+
ADD ./hetzner-mirror_x86_64.list /tmp/hetzner-mirror_x86_64.list
20+
ADD ./hetzner-mirror_arm64.list /tmp/hetzner-mirror_arm64.list
21+
22+
RUN if [ "${HOSTTYPE}" = "x86_64" ]; then \
23+
cp /tmp/hetzner-mirror_x86_64.list /etc/apt/sources.list.d/hetzner-mirror.list \
24+
; fi
25+
RUN if [ "${HOSTTYPE}" = "aarch64" ]; then \
26+
cp /tmp/hetzner-mirror_arm64.list /etc/apt/sources.list.d/hetzner-mirror.list \
27+
; fi
28+
1929
# Install base packages
2030
RUN apt-get -y update && \
2131
apt-get -y upgrade && \
@@ -87,6 +97,7 @@ RUN apt-get -y update && \
8797
xz-utils \
8898
thrift-compiler
8999

100+
90101
# Install multi-lib gcc (x86 only)
91102
RUN if [ "${HOSTTYPE}" = "x86_64" ]; then \
92103
apt-get install --no-install-recommends -y \

hetzner-mirror_arm64.list

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Packages and Updates from the Hetzner Ubuntu Mirror
2+
deb https://mirror.hetzner.com/ubuntu-ports/packages noble main restricted universe multiverse
3+
deb https://mirror.hetzner.com/ubuntu-ports/packages noble-updates main restricted universe multiverse
4+
deb https://mirror.hetzner.com/ubuntu-ports/packages noble-backports main restricted universe multiverse
5+
deb https://mirror.hetzner.com/ubuntu-ports/packages noble-security main restricted universe multiverse

hetzner-mirror_x86_64.list

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Packages and Updates from the Hetzner Ubuntu Mirror
2+
deb https://mirror.hetzner.com/ubuntu/packages noble main restricted universe multiverse
3+
deb https://mirror.hetzner.com/ubuntu/packages noble-updates main restricted universe multiverse
4+
deb https://mirror.hetzner.com/ubuntu/packages noble-backports main restricted universe multiverse
5+
deb https://mirror.hetzner.com/ubuntu/packages noble-security main restricted universe multiverse

0 commit comments

Comments
 (0)