chainguard-dev / chainguard-dev/dfc

-D flag needed when converting between Dockerfile that uses useradd to one that uses adduser

Open
#101 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
103
Forks
29
PR merge metrics
No merged PRs in 30d

Description

Starting with a Debian-based Dockerfile, I ran dfc to convert it and this line:
RUN useradd -m -s /bin/bash appuser
was changed to:
RUN adduser --shell /bin/bash appuser

However, without manually adding -D building the image will fail as follows:

RUN adduser --shell /bin/bash appuser:
0.131 passwd: password for appuser is unchanged
0.131 Changing password for appuser
0.131 New password:

whereupon the job does not complete successfully. The -D allows useradd to not assign a password and the build completes properly.

The request is for the dfc tool to insert the -D flag when converting to adduser syntax.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name a file or test; locate the Dockerfile conversion rule that changes useradd to adduser and find its existing test coverage. Reproduce the Debian-based example, then verify the converted command includes -D and that the relevant conversion tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
dockerfile, go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.