docker container run --name web -p | Run a container from the Alpine version 3.9 image, name the running container “web” and expose port 5000 externally, mapped to port 80 inside the container. |
docker container stop web | Stop a running container through SIGTERM |
docker container kill web | Stop a running container through SIGKILL |
docker network ls | List the networks |
docker container ls | List the running containers (add –all to include stopped containers) |
docker container rm -f $(docker ps -aq) | Delete all running and stopped containers |
docker container | Print the last 100 lines of a container’s logs |