Make ubuntu22 base image docker cache friendly
Use wget instead of ADD to allow efficient caching of tini install.
This commit is contained in:
@@ -53,15 +53,15 @@ RUN apt-get update && \
|
|||||||
flex \
|
flex \
|
||||||
m4 \
|
m4 \
|
||||||
# python3-pip for conf template generation
|
# 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 && \
|
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
|
pip3 install --ignore-installed pyyaml
|
||||||
|
|
||||||
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
|
# 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
|
# it will be copied into target containers, to print exit numbers and handle signals properly
|
||||||
ENV TINI_VERSION=v0.19.0
|
ENV TINI_VERSION=v0.19.0
|
||||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} /tini
|
RUN wget https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} -O /tini && chmod +x /tini
|
||||||
RUN chmod +x /tini
|
|
||||||
|
|
||||||
# In some network environments, GIT proxy is required
|
# 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"
|
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
|
||||||
|
|||||||
Reference in New Issue
Block a user