flyctl machine run does not respect [build]dockerfile in config

My config toml has

[build]
dockerfile = "Containerfile.foo"

Relying on config fails:

$ flyctl machine run . -c fly-foo.toml --name bar --schedule hourly
Error app does not have a Dockerfile or buildpacks configured. See https://fly.io/docs/reference/configuration/#the-build-section

Specifying the containerfile explicitly works:

$ flyctl machine run . -c fly-foo.toml --dockerfile Containerfile.foo --name bar --schedule hourly

Interesting, thanks for the report. I put an issue here: fly machine run doesn't respect `[build]` block in `fly.toml` · Issue #1770 · superfly/flyctl · GitHub

Issue has been fixed in release v0.0.473