Skip to content

Commit 9df1986

Browse files
committed
Disable cache for /var/lib/apt/lists because of clashes with multi-arch builds
1 parent 75847ac commit 9df1986

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
FROM debian:12 AS base
22

3-
RUN --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
3+
RUN --mount=type=tmpfs,target=/var/lib/apt/lists,sharing=locked \
44
--mount=type=tmpfs,target=/var/cache \
55
--mount=type=tmpfs,target=/var/log \
6-
apt-get -qq update && \
7-
apt-get -qq --yes dist-upgrade
6+
apt-get update && \
7+
apt-get dist-upgrade --yes
88

99

1010
FROM base AS build-c
1111

12-
RUN --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
12+
RUN --mount=type=tmpfs,target=/var/lib/apt/lists,sharing=locked \
1313
--mount=type=tmpfs,target=/var/cache \
1414
--mount=type=tmpfs,target=/var/log \
15+
apt-get update && \
1516
apt-get install --yes \
1617
build-essential \
1718
cmake
@@ -48,9 +49,10 @@ FROM base AS final
4849
# - socat
4950
# - tcpdump
5051

51-
RUN --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
52+
RUN --mount=type=tmpfs,target=/var/lib/apt/lists,sharing=locked \
5253
--mount=type=tmpfs,target=/var/cache \
5354
--mount=type=tmpfs,target=/var/log \
55+
apt-get update && \
5456
apt-get install --yes \
5557
bind9-dnsutils \
5658
ca-certificates \

0 commit comments

Comments
 (0)