docker_learn_process
docker_learn_process
bash
Copy
Edit
docker --version # Check Docker version
docker run hello-world # Run your first container
docker ps # List running containers
docker ps -a # List all containers (including stopped ones)
docker images # List all images
docker rm <container_id> # Remove a container
docker rmi <image_id> # Remove an image
🔍 Learn to Work with Containers
bash
Copy
Edit
docker run -it ubuntu bash # Run an interactive Ubuntu container
docker exec -it <container_id> bash # Access running container
docker logs <container_id> # View container logs
3️⃣ Learn Dockerfile & Image Building
What is a Dockerfile? → Defines how an image is built
Build an Image
dockerfile
Copy
Edit
# Sample Dockerfile
FROM python:3.9
WORKDIR /app
COPY . /app
RUN pip install -r requirements.txt
CMD ["python", "app.py"]
Commands to build & run:
bash
Copy
Edit
docker build -t my-python-app .
docker run -d -p 5000:5000 my-python-app
👉 Resources:
Would you like recommendations for specific use cases (e.g., deploying bots,
managing logs, etc.)? 🚢