Getting started
Deploy a public Docker image
Run any public Docker image on DployHub, such as nginx:1.27-alpine or a ghcr.io image, with HTTPS, staging, logs and rollback included out of the box.
Updated 3 min read
If you already build container images in your own pipeline, you can skip our build step entirely. Give DployHub a public image name with a tag and we pull it, run it and put it behind HTTPS on its own address, with staging, logs, metrics and rollback just like any other app.
Create an app from an image
- 1
Open New app
Go to Apps, then New app (/portal/apps/new).
- 2
Choose Docker image
Enter the full image name with a tag, for example
nginx:1.27-alpineorghcr.io/org/app:1.4.0. - 3
Set the port
Enter the port the image listens on. For the official nginx image that is
80. Set the health check path if/is not a good page to check. - 4
Name, size and create
Name the app, choose resources for live and create it. We pull the image and the first deploy goes live automatically.
Use explicit tags
Always deploy a specific version tag such as 1.4.0 rather than latest. A fixed tag makes it obvious which version is running and keeps rollbacks meaningful. A typical CI step builds and pushes a new tag for each release:
docker build -t ghcr.io/acme/shop:1.4.0 .
docker push ghcr.io/acme/shop:1.4.0Make the image work on DployHub
- Listen on
0.0.0.0, not127.0.0.1. We also set thePORTenvironment variable, which your app can read. - Answer HTTP with a status below 500 on the health check path within 90 seconds of starting.
- Write anything you need to keep, such as uploads or SQLite files, under
/data. Everything else in the container is reset on every deploy or restart. - Print logs to stdout and stderr so they show up in the Logs tab.
Deploying new versions
Image apps have no webhook, so press Deploy when you want to pull again. Each deploy goes to staging first; press Go live to promote the same image to live. Rolling back reuses an image we already keep for the app, and we keep the last 5 built images per app, so a rollback takes seconds.
Common problems
- Pull fails: check the name and tag, and that the image is public.
- Deploy says the app didn't answer on the port: the port setting does not match the image. See Port and health checks.
- Exit code 137: the container ran out of memory. Increase memory in Settings, then read App crashed: out of memory.
If the logs still leave you guessing, raise a ticket with the app and deployment attached.
Frequently asked questions
Can I use an image from a private registry?
No. The image must be public because we pull it without credentials.
Which registries work?
Any registry that serves public images, including Docker Hub and ghcr.io, as long as the full name and tag are given.
Does pushing a new tag deploy automatically?
No. Docker image apps are deployed manually with the Deploy button.
Related articles
- Deploy with your own DockerfileUse your own Dockerfile on DployHub for full control over the runtime: how detection works, the EXPOSE port rule, Dockerfile path and best practices.
- Port and health checks for zero-downtime deploysHow DployHub uses your port and health check path to release new versions with zero downtime, what the failure messages mean and how to fix them.
- Persistent storage: keep files safe under /dataEach live app gets persistent storage mounted at /data. Learn what survives deploys, how to store uploads and SQLite files, and how to add more space.
- Roll back to a previous version in secondsUndo a bad release by rolling back to an earlier successful version from the Deployments tab. No rebuild, it takes seconds, and the last 5 images are kept.