Suggest an editImprove this articleRefine the answer for “What is a Dockerfile?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)A **Dockerfile** is a text file with a set of instructions that describe how to build a Docker image. **Key point:** a Dockerfile is the recipe, a Docker image is the finished dish, and a container is a running instance of that "dish" in action.Shown above the full answer for quick recall.Answer (EN)ImageA Dockerfile is a text file with a set of instructions that describe **how to build a Docker image**. Each line in a Dockerfile is a build step (installing dependencies, copying files, running commands, etc.). --- ### **What a Dockerfile does** - sets the base image (for example, `ubuntu` or `python:3.10`); - copies project files into the future image; - installs dependencies; - configures the working directory and environment variables; - specifies the command that will run when the container starts. --- ### **The simplest example of a Dockerfile** ```Dockerfile FROM python:3.10 WORKDIR /app COPY . . RUN pip install -r requirements.txt CMD ["python", "app.py"] ``` --- ### **How it is used** 1. Write the Dockerfile 2. Build the image: ```bash docker build -t myapp . ``` 3. Run the container: ```bash docker run myapp ``` --- **In short:** a Dockerfile is the recipe. A Docker image is the finished dish. A container is a running instance of that "dish" in action.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.