Deploy a container image
Already build your app in CI? Deploy the finished image instead of building from source. DockHive pulls it, checks that it starts and answers its health check, then switches traffic to it, just like a build from GitHub. Versions, rollbacks, logs, environment variables and custom domains all work the same way.
Deploy an image
Section titled “Deploy an image”- In App Hosting, click Deploy an image.
- Fill in:
- App name and Region.
- Image: the image pinned to a digest, for example
ghcr.io/team/app@sha256:…. A tag such as:lateston its own isn’t accepted, so you always know exactly what’s running. - Port: the port your app listens on. Leave it empty to use the port the image declares (
EXPOSE). - Health check path, App type (web or background worker) and App size, if you need them.
- Environment variables, one
NAME=valueper line. - Registry login (private images only): a username and a password or access token.
- Click Deploy image.
To find an image’s digest, run:
docker buildx imagetools inspect ghcr.io/team/app:v1.4.0or copy it from your CI’s build output.
Images that work
Section titled “Images that work”- Built for
linux/amd64. - From a registry reachable on the internet, such as GitHub Container Registry, Docker Hub, GitLab, Google Artifact Registry or Amazon ECR.
- Up to 8 GB unpacked.
Your image gets the same protections and limits as every DockHive app.
Deploy a new version
Section titled “Deploy a new version”Open the app. The Image card shows the digest that’s running. Paste a new digest under Deploy a new digest and deploy it. The previous version stays available for rollback.
Private registries
Section titled “Private registries”Save a registry login on the app’s Image card, or when you deploy. It’s stored encrypted, is never shown again, and is only sent to the registry it was saved for. Click Remove to delete it. Use a read-only access token where your registry supports one.
With the API
Section titled “With the API”curl -X POST "https://api.dockhive.io/api/v1/apps/deploy" \ -H "Authorization: Bearer $DOCKHIVE_API_KEY" \ -H "X-Region: eu" \ -H "Content-Type: application/json" \ -d '{ "name": "my-api", "image": "ghcr.io/team/app@sha256:…", "app_port": 8080, "registry_username": "ci-bot", "registry_password": "'"$REGISTRY_TOKEN"'" }'To deploy a new digest to an existing app, send the same request to /api/v1/apps/projects/PROJECT_ID/deploy with the new image.
| Error | Meaning |
|---|---|
image_not_pinned |
Add the @sha256:… digest to the image. |
invalid_image |
The image reference isn’t valid. |