I was trying to set up a new retool instance on docker when I encountered a 401 Unauthorized error:
$ docker compose up -d
[+] Running 3/3
✘ retooldb-postgres Error failed to resolve reference "docker.io/library/postgres:15... 0.8s
✘ https-portal Error context canceled 0.8s
✘ postgres Error context canceled 0.8s
Error response from daemon: failed to resolve reference "docker.io/library/postgres:15.12": failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://auth.docker.io/token?scope=repository%3Alibrary%2Fpostgres%3Apull&service=registry.docker.io: 401 Unauthorized
I had just signed up for a new docker account and had not verified my email yet. Docker will return 401 Unauthorized if your email is not verified.
I’ve hit this issue a few times before, always after starting a new job. Quite frustrating!

Leave a Reply