flyctl launch does not create Dockerfile

Hello, when I run “flyctl launch” the project is built correctly but there is no Dockerfile created, only a .dockerignore and fly.toml. I am not sure what to do here, every tutorial online says this command creates the Dockerfile for me. Even in the documentation but this is not happening for me. When I then run flyctl deploy I get an error because it can not find a dockerfile. I am using Ubuntu 22 and have a django project with postgres. I also have the docker engine installed on my system.

flyctl launch
An existing fly.toml file was found for app _
? Would you like to copy its configuration to the new app? Yes
Scanning source code
Could not find a Dockerfile, nor detect a runtime or framework from source code. Continuing with a blank app.
Creating app in /home/proj
We're about to launch your app on Here's what you're getting:

Organization: _              (fly launch defaults to the personal org)
Name:         _ (from your fly.toml)
Region:      _               (from your fly.toml)
App Machines: shared-cpu-1x, 256MB RAM          (from your fly.toml)
Postgres:     <none>                            (not requested)
Redis:        <none>                            (not requested)
Sentry:       false                             (not requested)

? Do you want to tweak these settings before proceeding? No
Created app '_' in organization 'personal'
Admin URL:_
Hostname: _
Wrote config file fly.toml

I have replaced my names with “_”.

flyctl deploy --wg=false
==> Verifying app config
Validating /home/proj
✓ Configuration is valid
--> Verified app config
==> Building image
✓ compatible remote builder found
INFO Override builder host with: https://fly-builder-_ (was tcp://[_)

Remote builder fly-builder-_ ready
Error: failed to fetch an image or build from source: app does not have a Dockerfile or buildpacks configured. See

Do you have any of the following: requirements.txt, Pipfile, or pyproject.toml?

yes have a requirments.txt, did pip freeze> requirments.txt right before flyctl launch.

If that file exists, is in the current working directory, and contains the string Django (in a case insensitive manner), then a Dockerfile should be produced.

1 Like

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