Error building: resolve: The system cannot find the path specified

I have a .NET app with a working Dockerfile in a directory structure like this:

/mysolution.sln
/deploy/fly/api.prod.toml
/src/MyProject.Api/MyProject.Api.fsproj <and other src files>
/src/MyProject.Api/Dockerfile

when I run a deploy like this from the project root: fly deploy -c deploy/fly/api.prod.toml, it ultimately fails to build and gives me a very vague error:

I have adjusted paths to the Dockerfile in the api.prod.toml fly config, and if the path is wrong, I get a much more specific error indicating such. I can run docker build ... just fine. fly deploy --local-only also fails with the same error. What else could be causing this?

You can also do a docker build, auth to Fly’s registry using flyctl auth docker, push the image to Fly manually, then do fly deploy --image X. That should skip any Fly-side build entirely, Depot or otherwise.

It’s a bit slower as it is moving a potentially large amount of data from outside of Fly to inside of Fly, but if you keep your images relatively light, it should not be a problem in practice.

1 Like

Interesting, thanks for the tip! I might have to try this.

It turned out (and thanks to paid support for helping me pinpoint this) that my having a junction point in the project path caused the flyctl tooling to fail. It apparently doesn’t follow symlinks (and junctions) correctly.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.