Skip to content

Commit 39e5dfd

Browse files
shr-projectkraj
authored andcommitted
docker-build: use --no-cache
* --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>
1 parent 9e12ad9 commit 39e5dfd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/actions/docker-build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ runs:
3232
n=1
3333
until [ "$n" -gt "$tries" ]; do
3434
echo "Building the docker image ${{ inputs.docker_image }}-${{ inputs.id }}... try $n..."
35-
if docker build . -f "${{ inputs.docker_image }}/Dockerfile" -t "${{ inputs.docker_image }}-${{ inputs.id }}"; then
35+
if docker build --no-cache . -f "${{ inputs.docker_image }}/Dockerfile" -t "${{ inputs.docker_image }}-${{ inputs.id }}"; then
3636
# This can fail if a dangling images cleaning job runs in
3737
# parallel. So we try this a couple of times to minimize
3838
# conflict. This is because while building, docker creates a

.github/workflows/docker-images/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ passing the appropriate `-f` argument.
1717
Here is an example for building the `dco-check` image:
1818

1919
```
20-
docker build . -f dco-check/Dockerfile -t dco-check
20+
docker build --no-cache . -f dco-check/Dockerfile -t dco-check
2121
```

0 commit comments

Comments
 (0)