Using a Docker agent on an EC2 instance, I keep getting an 404 image not found error(no such image: repo/image_name:tag)


In the use case of this user, it was due to not enough storage capacity on the EC2 instance.


Clean up space on the instance (e.g. by pruning old images) or attach a new EBS volume to the instance.

Slack discussion

View in #prefect-community on Slack

Caleb_Ejakait @Caleb_Ejakait: Hey guys! Quick question about the DockerRun config. I am running a docker agent on an EC2 instance and have specified a custom image that I have added my flow dependencies to. But keep getting an 404 image not found error(no such image: repo/image_name:tag). This is the same even from prefect core images for a simple test flow. Is there something I could have missed in the agent config?
I am also using GCS storage and building the docker image in CI/CD

Matthias @Matthias: To ensure it is an issue with your Prefect setup. Can you use a simple docker run on that EC2 instance?

Anna_Geller @Anna_Geller: Can you share more about what your CI/CD process is doing? For example, if this builds an image with a specific tag, then you would need to ensure that the same image tag is set on your DockerRun.

with Flow(
    run_config=DockerRun(image="community:latest", labels=["docker"]),
) as flow:
    hw = hello_world()

Caleb_Ejakait @Caleb_Ejakait: I believe I overlooked some logs.Turns out it was a low storage issue on the EC2 instance and the pull command was hitting an error because of it. Just tested it again and it seem to be working on a test flow. Will circle back if anything else come up. Thanks for the recommendations @Matthias and @Anna_Geller.

Anna_Geller @Anna_Geller: Nice work!