[PATCH v2 1/5] test: Containerfile: fix build issue related to apt cleanup.
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri Dec 12 01:20:47 PST 2025
Hi,
On 12/12/25 6:08 AM, chalianis1 at gmail.com wrote:
> From: Chali Anis <chalianis1 at gmail.com>
>
> We cleanup the apt data after the second install group otherwise we
> we have to do an apt update.
This is by design as my understanding was that some tools save each RUN
command separately as layer into the container and so if we don't delete
it again in the same run, the final container will get bigger.
Having to do an extra apt update at start is thus an acceptable tradeoff.
Cheers,
Ahmad
>
> => ERROR [ 3/10] RUN apt-get install -y --no-install-recommends lsb-release gpg &&
> wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 20 -n trixie 0.3s
> ------
> > [ 3/10] RUN apt-get install -y --no-install-recommends lsb-release gpg &&
> wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 20 &&
> apt-get remove -y lsb-release gnupg &&
> apt-get autoremove -y --purge && apt-get clean &&
> rm -rf llvm.sh /var/lib/apt/lists/*:
> 0.240 Reading package lists...
> 0.258 Building dependency tree...
> 0.261 Reading state information...
> 0.266 E: Unable to locate package lsb-release
> 0.266 E: Unable to locate package gpg
> ------
>
> 1 warning found (use docker --debug to expand):
> - MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label (line 6)
> Containerfile:67
> --------------------
> 66 |
> 67 | >>> RUN apt-get install -y --no-install-recommends lsb-release gpg \
> 68 | >>> && wget https://apt.llvm.org/llvm.sh \
> 69 | >>> && chmod +x llvm.sh && ./llvm.sh ${LLVM_VERSION} -n trixie \
> 70 | >>> && apt-get remove -y lsb-release gnupg \
> 71 | >>> && apt-get autoremove -y --purge \
> 72 | >>> && apt-get clean \
> 73 | >>> && rm -rf llvm.sh /var/lib/apt/lists/*
> 74 |
> --------------------
> ERROR: failed to solve: process "/bin/sh -c apt-get install -y --no-install-recommends
> lsb-release gpg \t&& wget https://apt.llvm.org/llvm.sh \t&& chmod +x llvm.sh &&
> ./llvm.sh ${LLVM_VERSION} -n trixie \t&& apt-get remove -y lsb-release gnupg \t&&
> apt-get autoremove -y --purge \t&& apt-get clean \t&&
> rm -rf llvm.sh /var/lib/apt/lists/*" did not complete successfully: exit code: 100
>
> Signed-off-by: Chali Anis <chalianis1 at gmail.com>
> ---
> test/Containerfile | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/test/Containerfile b/test/Containerfile
> index c9e11b45985f..e322fed15727 100644
> --- a/test/Containerfile
> +++ b/test/Containerfile
> @@ -56,9 +56,7 @@ RUN apt-get update && apt-get upgrade && apt-get install -y --no-install-recomme
> device-tree-compiler \
> u-boot-tools \
> yamllint \
> - yq \
> - && apt-get clean \
> - && rm -rf /var/lib/apt/lists/*
> + yq
>
> ENV GCC_VERSION=15.2.0
> ENV LLVM_VERSION=20
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list