Skip to content

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

@aaronhmiller

Description

@aaronhmiller

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.

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