Report this

What is the reason for this report?

External image App fails deployment, App image succeeds

Posted on June 24, 2025

I am deploying a container to the App Platform as a web service.

If I deploy a pre-built image, the build is obviously skipped, and the deploy stage fails usually[^1] with:

ERROR failed health checks after 1 attempts with error Readiness probe failed: dial tcp 10.xxx.xxx.xxx:8080: connect: connection refused

If I deploy with a GitHub repo (the same Dockerfile), the build is obviously not skipped, succeeds, and the deploy stage succeeds.

The only thing I am left trying to debug is the externally built image is for the wrong platform, but DO recommends linux/amd64 which is what it is built for.

Repo: https://github.com/freeCodeCamp/exam-creator/tree/4713a42e8ba966307d8ab62986b489bf28cbe13d


[1]: Sometimes the deploy logs fail with just []



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey Shaun,

I’ve seen this kind of thing happen before, and in most cases, it’s due to the container not exposing the right port or not listening on the expected interface.

App Platform expects your app to listen on port 8080 by default. If your app is using a different port like 3000, either update the app to use 8080 or set the correct port in the App Platform settings under the “HTTP Port” field.

Also, make sure your app is binding to 0.0.0.0 and not localhost, otherwise, the internal health checks won’t be able to reach it and the deploy will fail with that “connection refused” error.

Since the same Dockerfile works when App Platform builds it from GitHub, the image itself is probably fine. The issue is likely with how the externally built image behaves at runtime, maybe it’s starting too slowly or not binding properly. You can test this locally by running:

docker run -p 8080:8080 your-image

If it doesn’t respond there, it won’t work on App Platform either.

- Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.