Commands for using docker images and containers
| Command | Description |
|---|---|
| docker --version | Get Docker version |
| docker login | Login to Docker Hub or other image repositories |
| docker pull | Pull images from repositories |
| docker inspect | Inspect image, values, and container |
| docker images | List all images in local Docker storage |
| docker create | Create a container |
| docker start | Start Docker containers |
| docker stop | Stop a running container |
| docker run -d | Create and run a container in detached mode |
| docker ps | List of running containers with minimal information |
| docker ps -a | List all containers with minimal information |
| docker kill | Forcefully kill an unresponsive running container |
| docker exec -it | Log into a running container |
| docker rm | Remove containers |
| docker rmi | Remove images |
| docker exec -it <containerId or Name> /bin/bash | Is used for interacting with running container |
| docker network inspect bridge | This command is used for inspecting specific network type that specific docker network. |
| docker run -d --name example_container_name -p 8000:80 | Used for running container in specified number |
| docker run -d --name example_container_name --net host | Used for running container in specific network type |