BlogDockerfile

How to deploy a Docker app with your own Dockerfile.

If there is a Dockerfile at the root of your project, Antideploy builds with it and uses its own start command.

How the Agent API works
  • At the rootThe only place Antideploy builds from
  • EXPOSE and PORTThe port you declare receives traffic
  • Your CMDYour own start command is used
  • Two limitsAn age rule, and no BuildKit features yet

The short answer

To deploy with your own Dockerfile, put it at the root of your project and give your coding agent the sentence below. Antideploy builds the image from your Dockerfile and runs its CMD or ENTRYPOINT. Traffic goes to the port you declare with EXPOSE, and Antideploy sets PORT to match. A Dockerfile is the way to run PHP, and the way to add system programs.

Say this to your coding agent

Set this project up to deploy on Antideploy. Fetch https://antideploy.com/agent.md and follow it.

What Antideploy does with a Dockerfile

  • It must be at the root. A Dockerfile in a subfolder cannot be used. Antideploy warns you and tries to detect the project itself. Move it to the root, or point the build at the folder it sits in.
  • Your start command is used. The CMD or ENTRYPOINT in the file is the start command. Antideploy does not add its own beside it.
  • The port comes from EXPOSE. The first EXPOSE line sets the port that receives traffic. Without one, Antideploy uses its default for the language. It sets PORT to the same number, so read it in your code.
  • The build is yours. Your install and build steps are in the file. Antideploy does not run the buildpack steps.

A Dockerfile that works

Dockerfile
FROM node:22-slim
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
ENV NODE_ENV=production
EXPOSE 3000
CMD ["node", "server.js"]

Your app inside the container must listen on 0.0.0.0 and on the port you expose. Read PORT from the environment so the two always match.

The two limits

  • The account rule. A custom Dockerfile builds from the first deploy for accounts signed in with GitHub or Google and on any paid plan. An account made with only an email address waits 7 days. While it waits, a project Antideploy recognises is built without its Dockerfile, and the deploy says so.
  • No BuildKit features yet. A step such as RUN --mount=type=cache needs BuildKit, which the builder does not have enabled. Your Dockerfile is fine. Removing the --mount=type=cache lines builds immediately.

When you need a Dockerfile

  • Your app needs a system program, such as ffmpeg or an image library
  • Your project is PHP, which runs only through a Dockerfile
  • You need an exact runtime version or build steps that the automatic build would not choose
  • You already have a Dockerfile that works elsewhere

If you do not have these needs, you can skip the Dockerfile. Do I need Docker, Kubernetes or YAML? explains why.

Step by step

  1. Put the Dockerfile at the root

    It sits next to your package.json, requirements.txt or go.mod.

  2. Paste the sentence and approve one link

    Your agent creates the app and deploys it.

  3. Deploy and open the link

    Antideploy builds the image with your Dockerfile, starts the container and checks that it answers on the exposed port. If it never listens, the deploy fails and shows what the app printed.

Common problems

  • The Dockerfile is empty. The build says "file with no instructions". Add the instructions, or delete the file and let Antideploy build the project.
  • A step fails with an exit code. The deploy names the failing step and the exit code. Run the same step locally to see why.
  • The app never starts listening. It listens on 127.0.0.1 or on a port that does not match EXPOSE. See never started listening.

01Before you commit

Here's where it stops.

A platform that only tells you what it is good at is one you find the edges of in production. These are the ones to know before your first deploy.

  1. A Dockerfile has an age gate

    A custom Dockerfile builds from the first deploy for accounts signed in with GitHub or Google and on any paid plan. An account made with only an email address waits 7 days.

  2. Apps sleep when idle

    On every plan, an app nobody is using goes to sleep and the next visit wakes it. The first request took 2.9 to 13.9 seconds in our measurements, depending on the stack. There are no always-on workers, so use a cron job or a webhook for background work.

  3. One instance, no previews

    Each app is one instance with 1 shared vCPU and 1 GB of memory, and a Java app gets 1 dedicated vCPU and 2 GB. There are no preview deployments and no per-branch URLs.

  4. The disk forgets

    Anything written to local disk is gone on the next deploy. Apps that speak S3 get a bucket instead.

02Questions

Dockerfile questions, answered.

Anything else? Write to us and a person answers.

support@antideploy.com
Which Docker features are supported?

Standard Dockerfile steps work, including COPY, RUN, ENV, EXPOSE and CMD. Features that need BuildKit, such as RUN --mount, are not supported yet.

How long can a build take?

Builds are given 20 minutes. A build that runs longer is stopped, and the deploy says so.

Can I use docker-compose?

Antideploy builds one container from the Dockerfile at the root. It runs one app per project.

Does my Dockerfile count against my plan?

No. The app counts as a live app, like any app with a server.

Deploy something. Start with one sentence.

Paste one sentence into your coding agent, click Approve once, and get a live link. No card, no trial clock.

Start from GitHub or a folder
Prompt copied Paste it into Claude Code, Codex or Cursor and press Enter.