Skip to content

bootc container lint produces warnings for /run/systemd that can't be resolved #2050

@yorickpeterse

Description

@yorickpeterse

As of #1912 bootc container lint now produces warnings for files in e.g. /run/systemd and /run/dnf.

While in the PR there seem to be hints as to this supposedly being fixed, when using the fedora-bootc:43 image I still get warnings that one can't seemingly resolve themselves. That is, take this Containerfile:

FROM quay.io/fedora/fedora-bootc:43
RUN bootc --version
RUN bootc container lint

When I build this I get the following output:

STEP 1/3: FROM quay.io/fedora/fedora-bootc:43
STEP 2/3: RUN bootc --version
bootc 1.13.0
--> 385ef71dd99f
STEP 3/3: RUN bootc container lint
Lint warning: nonempty-run-tmp: Found content in runtime-only directories (/run, /tmp):
  /run/systemd
  /run/systemd/resolve

Checks passed: 12
Checks skipped: 1
Warnings: 1
COMMIT ghcr.io/yorickpeterse/servers/web:main
--> 3a584bb0f38a
Successfully tagged ghcr.io/yorickpeterse/servers/web:main
3a584bb0f38acd64bf1d829ffab74c72855951abd15eb1a0e5bcd3806f2c9cc7

Removing all of /run/systemd or /run/systemd/resolve won't work because you'll run into a "Device or resource busy" error. Since the directories are apparently created before you run any of your own commands you can't mount e.g. a tmpfs over /run either.

The result is that as it stands now, there doesn't seem to be a way around these warnings at least when using the fedora-bootc:43 image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions