16
Oct
Here are some common Docker commands for managing containers, images, networks, and volumes: 1. Docker Container Commands: Run a container: docker run -d --name <container-name> <image-name> Runs a container in detached mode (-d) from the specified image. Example: docker run -d --name my-nginx nginx List running containers: docker ps Shows all currently running containers. Add -a to list all containers, including stopped ones. Stop a container: docker stop <container-id|container-name> Stops a running container. Remove a container: docker rm <container-id|container-name> Deletes a stopped container. Use -f to force-remove a running container. 2. Docker Image Commands: Build an image: docker build -t…