Jumping in from the side to say I got it working without a HTTP service in my app.
But I can’t bring it into alignment with the problem you are facing since I don’t understand what you mean by “[…]make this work with a Dockerfile and no build”. You have to build the container, that is the point.
So I will explain my steps:
First, I removed everything generated under [[services]]. I faced the same problem as described earlier about not having that section at all. (Hint: I totally I agree that flyctl config validate should fail with a missing [[service]] section)
Then I defined how to build an image of my app using the Dockerfile
FROM rust:1.62.1 AS builder
COPY . .
RUN cargo build --release
FROM debian:buster-20220801-slim
COPY --from=builder ./target/release/app ./target/release/app
CMD ["/target/release/app "]
Created a new app using flyctl app create and pushed it using flyctl deploy
I struggled a lot with the caching, since during testing I had a typo in my CMD path and I couldn’t get it to not use the cached layers in the docker build.
But that was it. The app is up and running. For context, my app is a discord bot that builds an outgoing connection to the discord backend. I don’t have to be reachable from the outside. And this “should” work, since running it as a docker container means the application will run as long as the docker container is running, which means the application has to enter some kind of loop to stay alive.
I hope this gives some hints or ideas to fix the problem.