-
Notifications
You must be signed in to change notification settings - Fork 493
DL3009 should ignore tmpfs mounts for apt cache #1095
Copy link
Copy link
Open
Labels
Description
I have a Dockerfile where I use a tmpfs mount for the apt cache. This is because the image is built in a Docker-in-Docker image in CI, so any cache volumes will be removed when the DinD image goes away at the end of the job anyway.
DL3009 shouldn't trigger for this, since the end result is the same: the apt cache is not in the final image.
Example Dockerfile:
FROM debian:12
# PASS
# Received: [DL3009]
# Expected: [DL3009]
RUN apt-get update
# PASS
# Received: []
# Expected: []
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt apt-get update
# FAIL
# Received: [DL3009]
# Expected: []
RUN --mount=type=tmpfs,target=/var/cache/apt --mount=type=tmpfs,target=/var/lib/apt apt-get updateOutput:
-:6 DL3009 info: Delete the apt-get lists after installing something
-:16 DL3009 info: Delete the apt-get lists after installing something
Version: Haskell Dockerfile Linter 2.12.1
Reactions are currently unavailable