When running docker image it shows error cannot find name for group ID 1000
Olivia Zamora
I am using Ubuntu in virtual machine. I have cloned my git repository in a directory in /home/Yocto_Dev using git clone command.
Below are the commands executed.
git clonedocker build -t ubuntu-yocto-kirkstonedocker run -it --name my_container -v /home/chandra/.ssh/root/.ssh -u "$(id -u):$(id -g)"ubuntu-yocto-kirkstone /bin/bash
command throw below error
**groups: cannot find name for group ID 1000
I have no name!@72cd4f3f84bd:/$** Note: Ubuntu machine and Docker container user ids are not same.
My goal is: To copy local SSH keys inside docker container and clone the repository inside docker container.
31 Answer
You need to add your user to the docker group
sudo usermod -aG docker yourusernameYou can refresh the group by running the command or logoug and log back in again
sudo `newgrp docker`Hope this helps.
1