ZoophostDocs

Deploy with Docker

Deploy a prebuilt image from any registry, or build from an inline Dockerfile without a repository.

Cloud hosting2 min read

Cloud hosting accepts two Docker sources: a prebuilt image from a registry, or a Dockerfile pasted into the console.

Option A: a prebuilt image

Use this when CI already builds and publishes the image, or when you run software distributed as an image.

  1. New deployment → Docker.
  2. Enter the Docker image — for example ghcr.io/you/app, docker.io/library/nginx or registry.example.com/team/app.
  3. Enter the Tag — latest, a version number or a commit SHA. Pin a version rather than latest for anything you care about.
  4. Continue through Destination, Plan slot and Review.

If the registry is private, the image reference must include credentials in the form the registry accepts (registry.example.com/team/app with a deployed credential configured by support). Public images need nothing extra.

Which port does it expose?

Zoophost routes to the port the container listens on. The convention is the image's EXPOSEd port; if the app listens on a non-standard port, set Settings → Networking → Exposed port to match. A container that listens on the wrong port builds successfully and then fails health checks or returns 502.

Option B: an inline Dockerfile

Use this to deploy a small service without keeping a repository, or to test a Dockerfile change quickly.

  1. New deployment → Dockerfile.
  2. Paste the full Dockerfile into the Dockerfile field.
  3. Continue to Destination, name the app and deploy.

The Dockerfile is stored with the app. Editing it later means updating the app and redeploying; the source is shown in the app's settings.

A minimal Node example:

FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
ENV PORT=3000
EXPOSE 3000
CMD ["node", "server.js"]

What the build needs

  • A process that stays in the foreground. Do not daemonize; the container must keep running.
  • Listen on 0.0.0.0, not 127.0.0.1. A server bound to loopback is unreachable from the proxy.
  • Read the port from the environment when possible, so the platform can set it.
  • No secrets baked into the image. Pass them as environment variables.
  • Write state outside the container. Files written to the container filesystem disappear on the next release. Use a managed database, Z2 Object Storage, or an attached volume on a VPS.

Private registries

If the registry requires authentication, contact support with the registry hostname and the repository. Credentials are configured on the platform side; do not paste registry tokens into the Dockerfile or environment variables.

Updating an image-based app

  1. Push the new tag to the registry.
  2. In the console, open the app and choose Redeploy.
  3. If the tag is fixed (for example latest), the new image is pulled during the build. If you deploy an immutable tag, change the tag in the app settings first, then redeploy.

Use Settings → Advanced → Images to keep to control how many previous images are retained.

Next

  • docker
  • image
  • registry
  • dockerfile
  • docker hub
  • ghcr

Ready to use this

Git-push containers, previews and custom domains, billed monthly in INR.

  • 5 websites on the smallest plan
  • Free SSL and custom domains
See cloud hosting plans
Still stuck? Open a ticket from Support tickets in the console, or email [email protected]. Include the service name, the exact error and what you already tried.