Glossary

What is Dockerfile?

Last updated June 15, 2026
Reviewed by Better-PaaS team

A file that describes how to build a Docker image. Learn what Dockerfile means in self-hosted deployment and Better-PaaS workflows.

Overview

A file that describes how to build a Docker image.

Definition

A file that describes how to build a Docker image.

Real-world example

A multi-stage Dockerfile builds a Go binary in stage one and copies only the binary into a distroless runtime image for smaller attack surface.

Common mistake

COPY . . before installing dependencies, busting Docker layer cache and slowing every deploy.

Better-PaaS in practice

Set deploy type to Dockerfile when Nixpacks cannot detect your stack or you need custom system packages.

FAQ

Is Dockerfile only relevant to Better-PaaS?

No. Dockerfile appears across Docker, cloud platforms, and self-hosted tooling. Better-PaaS exposes the concept in deploy logs, dashboard fields, or docs when it affects your app.