Docker commands:

This command will list all running containers, showing information on them including their ID, name, base image name, and port forwarding->

docker ps

Details of a single container

docker inspect <container_id>

This command is used to define a container — it processes the Dockerfile and creates a new container definition. We’ll use this to define our microservice containers->

docker build .

Ideally Build an image with a tag name

docker build -t <tag_name> .

This command pulls the container image from the remote repository and stores the definition locally->

docker pull [image name]

This command starts a container based on a local or remote (e.g. DockerHub) container definition. We’ll go into this one quite a bit->

docker run

See all images

docker images ps

See Running container

docker container ps

See running and stopped containers

docker container ps -a

Remove all containers