⭐ 0

Missing FROM Instruction Example: A Common Dockerfile Error

Check a Dockerfile for an uppercase instruction, a FROM line, and a small set of argument shapes.

🔒 Processed entirely in your browser — nothing you enter here is ever uploaded.

The result appears on this page after you run the tool. Nothing you enter is uploaded.

Processing... 0%
Validating instructions
Checking FROM directives
Verifying ports syntax
Checking uppercase formats
Compiling report

Result

About this tool

This page opens the Dockerfile validator preloaded with a file that starts with `WORKDIR` instead of `FROM`. Docker requires every Dockerfile to declare a base image before anything else happens — only comments and `ARG` are allowed to come first — and this example is missing that line entirely, so the validator flags it on line 1 the moment the page loads.

It's an easy mistake to make in practice: copying the body of an existing Dockerfile into a new file, trimming a multi-stage build down to one stage, or losing the first line to a bad merge or paste can all silently strip the `FROM` instruction while leaving everything else intact and syntactically fine on its own. Because the rest of the file looks completely ordinary, this class of error is often only caught when the actual `docker build` fails.

Add a `FROM node:18-alpine` (or any valid base image) as the first line in the box below to see the result flip from invalid to valid, or paste in your own Dockerfile to check it against the same base-image requirement.

Example. FROM ubuntu:22.04 followed by RUN echo hi passes. The lowercase word from fails. FROM --platform=linux/amd64 ubuntu:22.04 fails the image pattern. EXPOSE 80/http fails. EXPOSE 443/tcp passes.

Limit. Only the listed uppercase instructions are known. FROM arguments must match image:tag or image@digest, with an optional AS name. Platform flags and ${IMAGE} are rejected. No image is built.