rootless script does not work on $(id -un) that returns backslash
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the rootless installer invoked by curl -fsSL https://get.docker.com/rootless | sh, focusing on the /etc/subuid check shown in the report and the corresponding subgid detection. Reproduce it with a user whose name contains a backslash and verify that rootless installation completes successfully without breaking the existing checks.
Written by the indexing model from the issue text.
Description
- This is a bug report
- This is a feature request
- I searched existing issues before opening this one
Expected behavior
Following the documentation https://docs.docker.com/engine/security/rootless/
the command below should enable the rootless mode for docker
curl -fsSL https://get.docker.com/rootless | sh
Actual behavior
the script fail on line
if ! grep "^$(id -un):\|^$(id -u):" /etc/subuid >/dev/null 2>&1; then
due to the presence of a backslash character in the output of the command "id -un"
Steps to reproduce the behavior
create and use a user with a backslash in his name
launch the command line :
curl -fsSL https://get.docker.com/rootless | sh
I have try to fix the lines for subuid and subgid detection using sed but it is not sufficient
grep "^$(id -un | sed -e "s/[\]/\\\\\\\\/g"):" /etc/subuid
Output of docker version:
(paste your output here)
Output of docker info:
(paste your output here)
Additional environment details (AWS, VirtualBox, physical, etc.)
aws workspace
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
- Dominant language
- Shell
- Stars
- 3.2k
- Forks
- 863
- Avg merge
- 3h 15m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker/docker-install
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
docker/docker-install#575 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
docker/docker-install#559 · 4 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
docker/docker-install#554 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
docker/docker-install#548 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
docker/docker-install#540 ·
All issues in docker/docker-install
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·
-
docs(agents): strengthen the no-backslash-escaped-backticks rule with an issue-creation example Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
technical-debt
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
ll7/robot_sf_ll7#9560 ·
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
oSoWoSo/vOid_Community_repOsitory#148 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100