Please enter a username matching the regular expression configured (addgroup error in Dockerfile)

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

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
28/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, shell

Research direction

Start with the Dockerfile entry that runs addgroup and useradd, then reproduce the failing image build using the reported PowerShell and VS Code setup. Compare the environment variables and username values with the command shown; done means the Dockerfile build completes successfully with the intended user and group.

Written by the indexing model from the issue text.

Description

=> ERROR [app 5/14] RUN addgroup --system --gid 1000 CPU && useradd --system -m --no-log-init --home-dir /home/CPU --uid 1000 --gid 0.6s

[app 5/14] RUN addgroup --system --gid 1000 CPU && useradd --system -m --no-log-init --home-dir /home/CPU --uid 1000 --gid CPU --groups CPU CPU:
0.577 addgroup: Please enter a username matching the regular expression
0.577 configured via the SYS_NAME_REGEX configuration variable. Use the
0.577 `--allow-bad-names' option to relax this check or reconfigure
0.577 SYS_NAME_REGEX in configuration.


failed to solve: process "/bin/sh -c addgroup --system --gid ${USER_ID} ${USER_NAME} && useradd --system -m --no-log-init --home-dir ${HOME} --uid ${USER_ID} --gid ${USER_NAME} --groups ${USER_NAME} ${USER_NAME}" did not complete successfully: exit code: 1

I tried to change the user name more than once but nothing + I'm working on win10 using PowerShell and VS code

1
2
3

Dominant language
JavaScript
Stars
3.1k
Forks
6.4k
PR merge metrics
No merged PRs in 30d

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.

More from docker/getting-started

All issues in docker/getting-started

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.