Tried to build and deploy a new version of my app today and got
fly deploy
==> Verifying app config
--> Verified app config
==> Building image
Searching for image 'andig/private-repo' remotely...
Error: failed to fetch an image or build from source: Authentication required to access image "docker.io/andig/private-repo:latest"
At the same time docker login -u andig works fine on that machine, so does fly auth docker.
This flow used to work. Has something changed for private repos? Can I still work with them?
Can you try with fly deploy --local-only? Remote builders don’t support private repos, so it’s likely you were deploying using your local Docker, which was the default before this change.
I can do that- it just came as a surprise. It’s not immediately clear to my why I even need a remote builder since all I’m asking for is to deploy the image that has already been built.
Update: from the docs:
Finally, if you already have a Docker image in a repository and just want to deploy that, you can skip the building process and go straight to the deploy with the image build option.
Since I already use the image option I wouldn’t expect any (remote) builders to be involved at all.
That is a good point @andig. The default behavior was changed because many users had problems with their local docker setups and in most cases the image built locally was for a different architecture than what Fly.io can use. By using a remote builder (by default) the incompatibility is not a problem anymore and remote builder has been reliable for a long time now.