docker-install
docker-install copied to clipboard
rootless script does not work on $(id -un) that returns backslash
- [x] This is a bug report
- [ ] This is a feature request
- [x] 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"
/cc @akihirosuda