Docker hosting

Deploy a Docker container from your Dockerfile

To deploy a Docker container on Makofy, commit a Dockerfile, make the container listen on the PORT environment variable (8080 by default), and connect the GitHub repo or run makofy deploy. Makofy builds the image exactly as written, runs it in a gVisor sandbox with HTTPS, and charges a flat price per container: $3.50 a month always on, $1.50 for a web container that may sleep, up to $35 for 4 GB with a reserved vCPU.

Last updated · By the Makofy team (Muncar Ventures LLC)

Why deploy with a Dockerfile

Makofy can build Node.js, Python, Go, Ruby and static sites without one, but a Dockerfile wins whenever it is present. Use it when you need a specific language version, system packages (ImageMagick, ffmpeg, a C toolchain), a language Makofy doesn’t auto-detect such as Rust, PHP, Java or Elixir, or simply the same image you already run locally and in CI.

How Makofy treats your Dockerfile

Dockerfile instructionOn Makofy
FROM (including multi-stage builds)Supported. Only the final stage is shipped.
RUN, COPY, ARG, ENV, WORKDIR, USERUsed as written during the build.
EXPOSEInformational only. Traffic goes to the app’s port, which is 8080 unless you set another with --port.
CMD / ENTRYPOINTStarts the container, unless you set a start command, which replaces CMD and runs through sh -lc.
HEALTHCHECKNot used. Makofy checks the port with TCP, or an HTTP path you configure.
VOLUMENot a persistent disk: files written inside the container are gone after the next deploy. Store data in Postgres or an external service.

Makofy looks for a file named Dockerfile in the build directory. If yours lives elsewhere, set a Dockerfile path and build context for the app; when you create an app from a GitHub repository, a Dockerfile found in a subfolder is picked up for you. Monorepos can also set a root directory so only one folder is built.

Listen on $PORT

Web and private services receive a PORT environment variable, set to 8080 unless you change it. Either make your program read PORT, or tell Makofy which port the image uses with makofy deploy --port 3000 (or in the dashboard). Bind to 0.0.0.0, not 127.0.0.1, or the health check cannot reach the process. Background workers and cron jobs don’t get a port at all.

A multi-stage Dockerfile that keeps images small

Smaller images build and start faster, which matters most on Nap, where the container has to boot when the first request arrives. Compile in one stage and copy only the result into a slim runtime image:

# Build stage: full toolchain
FROM rust:1.82-slim AS build
WORKDIR /src
COPY . .
RUN cargo build --release

# Runtime stage: just the binary
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
 && rm -rf /var/lib/apt/lists/*
COPY --from=build /src/target/release/myapp /usr/local/bin/myapp
ENV PORT=8080
CMD ["myapp"]

Add a .dockerignore for .git, node_modules, target and local .env files so they never enter the build context. When you deploy from the CLI, makofy deploy already uploads only files Git tracks or would track, respecting .gitignore.

Deploy it, step by step

  1. Build and run the image locally once: docker build -t myapp . && docker run -e PORT=8080 -p 8080:8080 myapp.
  2. Start the 7-day free trial at makofy.com. A card is required; nothing is charged until the trial ends.
  3. Create an app from the GitHub repository and branch (every push redeploys), or run makofy deploy in the folder that holds the Dockerfile.
  4. Choose the service type: web for public HTTP, private for internal services, worker for queue consumers, cron for scheduled jobs (--type cron --schedule "*/30 * * * *").
  5. Set environment variables in the dashboard rather than baking secrets into the image. They apply on the next deploy.
  6. Deploy and check makofy logs for the build output and the container’s latest log lines.
makofy deploy                       # web service, port 8080
makofy deploy --port 3000           # image listens on 3000
makofy deploy --type worker         # no port, always on
makofy deploy --type cron --schedule "0 2 * * *" --command "./bin/cleanup"

Builds, health checks and rollbacks

Builds run on Makofy and must finish within 15 minutes, so keep heavy steps cached in early layers (copy lockfiles and install dependencies before copying the rest of the source). Once built, the container has about two minutes to accept connections on its port, or to answer the HTTP health-check path you set. If it doesn’t, the deploy is marked unhealthy and the previous healthy image is redeployed. Rolling back by hand from the dashboard reuses an earlier image, so it needs no rebuild.

Pricing per container

Instance typeResourcesPer container per month
Nap512 MB / 0.5 vCPU, sleeps after 15 idle min (web only)$1.50
Starter512 MB / 0.5 vCPU, always on$3.50
Basic1 GB / 1 vCPU$6
Pro2 GB / 2 vCPU, protected first under load$12
Dedicated4 GB with 1 vCPU reserved$35

A Docker Compose stack becomes one Makofy app per service: for example the web container on Basic, a worker on Starter, and managed Postgres ($3) and Redis ($2) instead of database containers, which keeps data out of disposable containers. Every container runs in its own gVisor sandbox, and traffic between workspaces is isolated. Compare the options on pricing or read the quickstart.

FAQ

Frequently asked questions

Can I deploy any Dockerfile on Makofy?

Yes, as long as the build finishes within 15 minutes and the container listens on its port (8080 by default) if it is a web or private service.

Does Makofy use the EXPOSE port from my Dockerfile?

No. Makofy sends traffic to the app’s configured port, 8080 by default, and sets PORT to match; use makofy deploy --port if your image listens elsewhere.

How much does it cost to run a Docker container?

A flat price per container per month: $3.50 always on with 512 MB, $1.50 on Nap for web containers that can sleep, up to $35 for 4 GB with a reserved vCPU.

Can I keep files on disk inside the container?

Not reliably: the filesystem is replaced on every deploy. Store data in managed Postgres ($3/month) or an external object store.

Is my container isolated from other customers?

Yes. Every app runs in a gVisor sandbox, a user-space kernel like Google Cloud Run uses, with network isolation between workspaces.

Related

Deploy your app in a few minutes.

Connect a GitHub repo or run makofy deploy. Flat price per app, 7-day free trial, card required.

Start free trial