DeployingTroubleshootingDockerfile changes don't apply

My Dockerfile changes don’t seem to apply

You have a Dockerfile in your repo, you edited it, but the build Lizard runs doesn’t match what you wrote.

What this means

The platform decided your repo’s Dockerfile was incomplete and regenerated one for you with lizardpack instead of using yours verbatim.

Why this can happen

This check runs only for GitHub-source services. Uploads (lizard up) always use a root Dockerfile as written.

On GitHub source, Lizard treats a root Dockerfile as incomplete when both are true:

  • it has a COPY of build, dist, out, .next or public written without a trailing slash, such as COPY dist /usr/share/nginx/html;
  • it has no RUN line that starts with npm, yarn, pnpm, bun, pip, pip3, bundle, cargo, go build, mvn or gradle.

Lizard assumes those artifacts were built outside the image, and lizardpack generates a replacement Dockerfile that includes the missing build step.

Two other settings also bypass your repo’s root Dockerfile. With dockerfilePath set, Lizard uses that file as written. Without it, a set buildCommand or startCommand makes Lizard synthesize a Dockerfile from those commands.

Possible solutions

Add a real build step

If you want your Dockerfile used as-is, give it an actual build step instead of copying pre-built output:

RUN npm ci && npm run build

Or force verbatim use

Set dockerfilePath. It takes priority over build and start commands for the image build, but a set startCommand still replaces your Dockerfile’s CMD at run time, so clear both in the same update. An empty value clears a field:

lizard service set api --set buildCommand= --set startCommand= --set dockerfilePath=Dockerfile

See also

Changing these build fields can start a build. Check lizard events before sending another redeploy, to avoid starting a second build.

Updated