Dockerization - Dockerfile explained line by line

Опубликовано: 27 Май 2026
на канале: Web With Niloofar
51
2

📦 Dockerfile used in this video
FROM python:3.11-alpine

WORKDIR /app

COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt

COPY . .

CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000"]

🛠 Build the Docker Image
docker build --tag your_image_name .

▶️ Run the Container
docker run --publish 8000:8000 your_image_name

💡 Notes

This image uses Python 3.11 on Alpine Linux for a smaller and faster build

0.0.0.0 allows access from outside the container

The app will be available at http://localhost:8000
____________________________________________
____________________________________________
📌 Next Video

In the next part, we’ll run this app using Docker Compose (YAML) 🚀
____________________________________________
____________________________________________

00:00 Intro
00:14 Dependencies
00:32 Dockerfile
02:11 Access from outside the container
02:38 .dockerignore
02:46 Build image
03:13 Run container