Error running `fly launch` for the first time- can't fetch python:3.10.6-bookworm image

Just installed flyctl and want to run fly launch for the first time on my new app, but the command fails with the following output:

==> Building image with Docker
--> docker host: 24.0.7 linux x86_64
[+] Building 0.1s (4/4) FINISHED
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 82B                                                                                   0.0s
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 376B                                                                               0.0s
 => CANCELED [internal] load metadata for docker.io/library/python:3.10.6-slim-bookworm                            0.1s
 => ERROR [internal] load metadata for docker.io/library/python:3.10.6-bookworm                                    0.1s
------
 > [internal] load metadata for docker.io/library/python:3.10.6-bookworm:
------
Error: failed to fetch an image or build from source: error building: failed to solve: python:3.10.6-bookworm: docker.io/library/python:3.10.6-bookworm: not found

So why is the flyctl failing to retrieve this image? I have tried uninstalling and reinstalling fly (not sure if it worked, but I deleted the .fly folder in my $HOME directory and reinstalled via powershell), no go. I have tried rerunning fly launch multiple times after removing the files that were created, no go.

Any help is greatly appreciated! I want to start using this software but I can’t even get it to start

Docker Hub doesn’t have the image.

https://hub.docker.com/_/python/tags?page=&page_size=&ordering=&name=3.10.6

Do you need this specific version? Debian 12 (bookworm) is new, but Python 3.10.6 is relatively old.

So why does Fly automatically request it? I’m surprised it doesn’t try to access any of the other slim images.

Also are you just suggesting I upgrade to Python 3.12? I have a very few dependencies so it should be manageable, but I’m shocked that 3.10 is already considered obselete

flyctl detects Python version you locally have. For example, Django apps will go through this detection code below.

Python 3.10.x is not obsolete, but it would be better to use Python 3.10.12 3.10.14. There have been multiple security fixes since 3.10.6.

(Update: 3.10.12 → 3.10.14)

Other than what Kaz mentioned, Python 3.10 is not considered obsolete, it’s just that not all combinations of a given Python version X all Debian bases are available on github. You can use 3.10.14-bookworm (just update the generated Dockerfile; it’s only generated when you run fly launch so subsequent deploys with fly deploy will not change that.

It would probably be interesting for the fly launch project scanner to NOT give you a Python-Debian combination that’s not available at the moment on Dockerhub, I’ll give you that :slight_smile:

  • Daniel

Pull request opened:

Meanwhile, simply remove -bookworm from the Dockerfile (it appears twice).

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