docker-build: use --no-cache
Some checks failed
Mirrors / Yocto Git Mirror (push) Has been cancelled

* --no-cache is needed to actually call apt update instead of using it
  from docker cache and then failing to fetch pruned packages as shown:
  https://github.com/agherzan/meta-raspberrypi/actions/runs/16327036376/job/46119768952?pr=1491

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Martin Jansa 2025-07-16 20:29:11 +02:00 committed by Khem Raj
parent 3dedb92dcc
commit 03981f9365
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ runs:
n=1
until [ "$n" -gt "$tries" ]; do
echo "Building the docker image ${{ inputs.docker_image }}-${{ inputs.id }}... try $n..."
if docker build . -f "${{ inputs.docker_image }}/Dockerfile" -t "${{ inputs.docker_image }}-${{ inputs.id }}"; then
if docker build --no-cache . -f "${{ inputs.docker_image }}/Dockerfile" -t "${{ inputs.docker_image }}-${{ inputs.id }}"; then
# This can fail if a dangling images cleaning job runs in
# parallel. So we try this a couple of times to minimize
# conflict. This is because while building, docker creates a

View File

@ -17,5 +17,5 @@ passing the appropriate `-f` argument.
Here is an example for building the `dco-check` image:
```
docker build . -f dco-check/Dockerfile -t dco-check
docker build --no-cache . -f dco-check/Dockerfile -t dco-check
```