Suggest an editImprove this articleRefine the answer for “How to create a Docker image?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)Creating a **Docker image** is usually done through a `Dockerfile`, and the process consists of three steps: create a `Dockerfile`, build the image with the `docker build` command, and run a container from it. **Key point:** `docker build -t name:tag .` is the core command for creating an image.Shown above the full answer for quick recall.Answer (EN)ImageCreating a Docker image is usually done through a `Dockerfile`. The process consists of three steps: --- ### **1. Create a** `Dockerfile` For example, for a simple Python application: ```Dockerfile FROM python:3.10 WORKDIR /app COPY . . RUN pip install -r requirements.txt CMD ["python", "app.py"] ``` --- ### **2. Build the image with a command** While in the folder with the `Dockerfile`, run: ```bash docker build -t myapp:1.0 . ``` Where: - `docker build` - the build command - `-t myapp:1.0` - the name and tag of the image - `.` - the build context (the current folder) --- ### **3. Check and run the container** Running a container from the built image: ```bash docker run --name mycontainer myapp:1.0 ``` --- ### **Summary** | Action | Command | |---|---| | Create an image | `docker build -t name:tag .` | | List images | `docker images` | | Run a container | `docker run name:tag` | --- If needed, I can show an **even simpler example**, an **example for Node.js**, or explain **each line of the Dockerfile one by one**. Which one shall we go with?For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.