flyctl trying to auto-detect Phoenix even though I specified a Dockerfile

We’re running flyctl launch in CI using the command below. There is a fly.toml file as well with some other settings (including dockerfile = "Dockerfile"), and it is being recognized in the output.

flyctl launch --no-deploy --copy-config --name "$app" --image "$image" --dockerfile Dockerfile --region "$region" --org "$org"

Our Elixir / Phoenix tooling is not installed in this build environment, but the CLI seems to be auto-detecting Phoenix and running the Phoenix tooling (mix release --docker) and causing a crash. This is really similar to my previous problem here, which we worked-around by passing the dockerfile option in the launch command as seen above.

It seems like the change that caused this behavior is here, where scanner.Scan() is called to validate the port on the dockerfile, but it’s interrupted by the framework detection that comes earlier in the scanner precedence.

The error is Error: mix not found in $PATH - make sure app dependencies are installed and try again

1 Like

Hi! thanks for reporting this with so much detail, it’s very appreciated.

There’s a fix for this bug in flyctl v0.0.532 - when the dockerfile flag is passed, it’ll only use the docker scanner :slight_smile:

Wow, amazing, thank you!!!

1 Like

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