Docker images are a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.
docker build -t <image_name>
docker build -t <image_name> .
(Note that there is a "." after it, don't forget to enter it.)
docker images
docker rmi <image_name>
docker image prune
Docker Hub is a service provided by Docker for finding and sharing container images with your team. Learn more and find images at https://hub.docker.com
docker login -u <username>
docker push <username>/<image_name>
docker search <image_name>
docker pull <image_name>
docker -d
docker --help
docker info
A container is a runtime instance of a docker image. A container will always run the same, regardless of the infrastructure. Containers isolate software from its environment and ensure that it works uniformly despite differences for instance between development and staging.
docker run --name <container_name> <image_name>
docker run -p <host_port>:<container_port> <image_name>
docker run -d <image_name>
docker start|stop <container_name> (or <container-id>)
docker rm <container_name>
docker exec -it <container_name> sh
docker logs -f <container_name>
docker inspect <container_name> (or <container_id>)
docker ps
docker ps --all
or docker ps -a
docker container stats