I tried to add a user to docker group but this did not help but when I run this build command by root - all is ok. But I need to be able to run it under the ordinary user
What is the reason of this error and how can I fix this?
It’s Oracle Linux Server release 8.6
By rootless you mean this? I do not think so. I was just given the server to build there images (though I have root there)
I have added the dashboard user to docker group and using visudo have set this
dashboard ALL=(ALL) NOPASSWD: /usr/bin/docker
The thing is that I can run docker hello world under this user and it says that all is ok
docker run hello-world
Unable to find image ‘hello-world:latest’ locally
latest: Pulling from library/hello-world
719385e32844: Pull complete
Digest: sha256:88ec0acaa3ec199d3b7eaf73588f4518c25f9d34f58ce9a0df68429c5af48e8d
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
The Docker client contacted the Docker daemon.
The Docker daemon pulled the “hello-world” image from the Docker Hub.
(amd64)
The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
But can’t understand why running some commands in a container throws this error
=> ERROR [stage-1 2/7] RUN apk add --no-cache vips-dev 3.6s
If you don’t run Docker root-less I would think you need to use root
The error is probably that the non-root user is downloading data from Internet and trying to write the image file to local disk - but has no permission. Images go in a special a Docker folder.