Posts

Showing posts from September, 2025

Docker Cheatsheet 2

Docker Cheat Sheet & Quick Reference Docker This is a quick reference cheat sheet for  Docker . And you can find the most common Docker commands here. # Getting Started Getting started Create and run a container in background $ docker run -d -p 80:80 docker/getting-started -d  - Run the container in detached mode -p 80:80  - Map port 80 to port 80 in the container docker/getting-started  - The image to use Create and run a container in foreground $ docker run -it -p 8001:8080 --name my-nginx nginx -it  - Interactive bash mode -p 8001:8080  - Map port 8001 to port 8080 in the container --name my-nginx  - Specify a name nginx  - The image to use General commands docker ps List running containers docker ps -a List all containers docker ps -s List running containers (with CPU / memory) docker images List all images docker exec -it <container> bash Connecting to container docker logs <container> Shows container's console log docker st...