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.
Is this still not supported? I’m trying to deploy a container image from a public gitlab container repo and flyctl seems to think that authentication is required. Switching to a local or remote builder isn’t an option for me. Thanks
I simply ran flyctl launch -i registry.gitlab.com/tvaughan/datopro-mic:1.0.6726. This is with the latest flyctl on macOS installed by brew. FYI - The ports and protocols are wrong. This is not a web service. Container registry is https://gitlab.com/tvaughan/datopro-mic/container_registry/4153765. I was able to pull this image from a brand new virtual machine that never had my gitlab credentials.
$ flyctl deploy
==> Verifying app config
--> Verified app config
==> Building image
Searching for image 'registry.gitlab.com/tvaughan/datopro-mic:1.0.6726' remotely...
Error: failed to fetch an image or build from source: Authentication required to access image "registry.gitlab.com/tvaughan/datopro-mic:1.0.6726"