Skip to content

devcontainer: useradd -l (hadolint DL3046) - #686

Open
randomizedcoder wants to merge 1 commit into
NVIDIA:mainfrom
randomizedcoder:security/devcontainer-useradd-l-flag
Open

randomizedcoder wants to merge 1 commit into
NVIDIA:mainfrom
randomizedcoder:security/devcontainer-useradd-l-flag

Conversation

@randomizedcoder

Copy link
Copy Markdown
Contributor

What: add -l to the devcontainer's useradd invocation.
Why: without -l, useradd may create a multi-gigabyte sparse /var/log/lastlog on high UIDs. UID 1000 is fine today but -l is the safe default and essentially free.
How: add the flag in .devcontainer/Dockerfile:8.

Found by: hadolint 2.14.0, rule DL3046useradd without flag -l and high UID will result in excessively large image.

.devcontainer/Dockerfile:8
Avoids large sparse lastlog on high UIDs.

Signed-off-by: randomizedcoder dave.seddon.ca@gmail.com <dave.seddon.ca@gmail.com>
randomizedcoder added a commit to randomizedcoder/dcgm-exporter that referenced this pull request Jun 20, 2026
Map each finding addressed in the report to its upstream PR
(NVIDIA/dcgm-exporter NVIDIA#681 NVIDIA#682 NVIDIA#683 NVIDIA#684 NVIDIA#685 NVIDIA#686 NVIDIA#687 NVIDIA#688 NVIDIA#689
 NVIDIA#690 NVIDIA#691 NVIDIA#692 NVIDIA#693 NVIDIA#694).

Signed-off-by: randomizedcoder dave.seddon.ca@gmail.com <dave.seddon.ca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant