Error failed to fetch an image or build from source: error connecting to docker: Could not find App

Hey I am using the free plan and trying to deploy a telegram bot app following this tutorial:

Provided a corresponding Dockerfile:

FROM python:3.9

RUN apt-get update && apt-get install -y
python3-pip
python3-venv
python3-dev
python3-setuptools
python3-wheel

COPY app/requirements.txt .
RUN pip install -r requirements.txt

COPY . .

CMD [“python”, “main.py”]

Unfortunately I get the error:

Error failed to fetch an image or build from source: error connecting to docker: Could not find App

Using the Debug I get:

DEBUG trying remote docker daemon
DEBUG Trying ‘Buildpacks’ strategy
DEBUG no buildpack builder configured, skipping
DEBUG result image: error:
DEBUG Trying ‘Dockerfile’ strategy
DEBUG → POST GraphQL Playground

{
“query”: “mutation($input: EnsureMachineRemoteBuilderInput!) { ensureMachineRemoteBuilder(input: $input) { machine { id state ips { nodes { family kind ip } } }, app { name organization { id slug } } } }”,
“variables”: {
“input”: {
“appName”: “telebot”,
“organizationId”: null
}
}
}

DEBUG {}
DEBUG result image: error:error connecting to docker: Post “GraphQL Playground”: dial tcp [2a09:8280:1:f28:246e:d6a:949:dbbf]:443: connect: no route to host
Error failed to fetch an image or build from source: error connecting to docker: Post “GraphQL Playground”: dial tcp [2a09:8280:1:f28:246e:d6a:949:dbbf]:443: connect: no route to host

All related answers did not work for me

Thanks in advance, would realy apprechiate the help

Hey there-- looking over the linked blog post, and the error message you’ve gotten, it doesn’t look like flyctl is able to locate your Dockerfile (since it would try to use your Dockerfile by default if knew where the Dockerfile is located) .

I would make sure that you’re running fly deploy -a app, (so that you know you’re deploying it to the right app) and making sure that you’re running fly deploy in your project root so that it knows where to look.

If that still fails, try seeing what happens when you manually specify your Dockerfile with --dockerfile.

1 Like

Your app name that you created should match with the app name defined in fly.toml.