Make ubuntu22 base image docker cache friendly

Use wget instead of ADD to allow efficient caching of tini install.
This commit is contained in:
Bartosz Podrygajlo
2025-05-29 15:10:23 +02:00
parent 171f1fc015
commit 8be33ed66f
+3 -3
View File
@@ -53,15 +53,15 @@ RUN apt-get update && \
flex \
m4 \
# python3-pip for conf template generation
python3-pip && \
python3-pip \
wget && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 && \
pip3 install --ignore-installed pyyaml
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
# it will be copied into target containers, to print exit numbers and handle signals properly
ENV TINI_VERSION=v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} /tini
RUN chmod +x /tini
RUN wget https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} -O /tini && chmod +x /tini
# In some network environments, GIT proxy is required
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"