failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: rpc error: code = Unknown desc = failed to fetch anonymous token: Get "https://auth.docker.io/token?scope=repository%3Alibrary%2Frockylinux%3Apull&service=registry.docker.io": dial tcp: lookup auth.docker.io on ipadress.
2
Answers
before
docker compose build --no-cache -progress=plain
run this first:
docker pull rockylinux:9-minimal
In Docker, actions like pulling images are performed by the Docker daemon and do not use your shell’s environment variables.
When working behind a proxy, apart from configuring your proxy settings within your shell, you need to also configure them in Docker deamon.
To configure proxy in docker deamon, create directory /etc/systemd/system/docker.service.d for Docker proxy settings config file. Then create /etc/systemd/system/docker.service.d/http-proxy.conf with the below contents. Replace
proxy_server_host
andproxy_server_port
with your proxy server’s host IP and port respectively.Apply the settings and restart docker with the below commands.
You can confirm whether the settings have been applied with: