Hi there, new to Torizon and Toradex. Got a question here that I am sure is operator error but I want to get confirmation. I have a brand new Verdin IMX8 plus setup with TorizonCore 6 on a Dahlia carrier board. I have Portainer up and running with evaluation containers and I can push and pull public docker images following the guides. I also have VSCode working with the docker extension and functions in there seem to work as well.
I can’t use the Toraxex extensions as I am on a Mac M1 arm machine and the extensions are x86. However, the Docker extension does work.
So, following one of the guides, I can create a docker image on my PC using the Torizon base image and adding the install of nano to the docker file as a test. The image gets created and I can push it to my docker hub account with no problems. My docker hub account is setup with private repositories and 2FA, so it requires I use a passkey token to login.
Now, when trying to pull this image from Docker Hub, I get a login error. So, following another guide, I performed the following:
sudo docker --config /etc/docker login
Which creates the config.json file and adds the credentials. This also works fine and reports successful login. Next, I do a docker pull and it fails with a permission error. It seems that when doing a
sudo docker pull when logged into the board using the Toradex user, it fails. Other docker commands work just fine with sudo including
docker run. I did notice that the config.json file is rw for root only.
So, the only way I can get the docker pull command to work is to first switch to root using
sudo -I, then the pull works and the container gets created. I can then switch back to the toradex user the other commands work just find with sudo. I do however get the following warning when using some
sudo docker <command> commands:
WARNING: Error loading config file: /etc/docker/config.json: open /etc/docker/config.json: permission denied
This does not happen with doing commands as the root user (i.e. not sudo). Is this by design? It’s not mentioned in any of the guides that to do a docker pull, one needs to actually be root rather than use sudo.