Docker commands

A list of useful docker commands.

Table 1. Some Docker commands
Commands Description
docker images List the created docker images.
docker ps List the running containers.
docker stop genero Stops the running docker container called "genero".
docker exec -it genero /bin/bash Open a terminal window in the container called genero.
docker diff genero See the changes made by the current container.
docker rmi genero Remove the "genero" image.
docker run --rm -t genero Run the docker image called genero
docker network inspect bridge Inspect the network bridge. Shows IP addresses of containers.
docker attach genero Attach to the running container genero.
Ctrl+p and Ctrl+q Detach from the container and leave it running. Returns you to the host.