A GUI for managing images and containers.
A repository to download official, verified, or sponsored images.
Responsible for creating and running containers.
Blueprints for software.
Running instances of images.
External storage attached to containers.
The network component that allows containers to communicate with each other.
A background process also called dockerd.
docker login- Log in to your Docker account.docker logout- Log out from your Docker account.docker info- Get system-wide Docker information.docker version- Show the Docker version.docker help- Get a list of all Docker commands.
-
docker search <image-name>- Search for a Docker image in Docker Hub. -
docker pull <image-name>- Get the image locally. -
docker images- View all local images. -
docker create <image-name>- Create a new container from an image. -
docker ps- List running containers. -
docker ps -a- List all containers, including exited ones. -
docker run <image-name>- Create and run a new container from an image. -
docker run -it <container-name>- Run a container in interactive mode. (Note: It's more common to usedocker run -it <image-name> <command>to run an interactive shell inside a container, butdocker run -it <container-name>can be used if the container has a default command to run interactively). -
docker run -p <host-port>:<container-port> <image-name>- Run an image in a container where<container-port>of the container is exposed at<host-port>on the local device. -
docker commit <container-name> <username>/<new-image-name>:<tag>- Create a new custom image from a container with a custom name and tag. -
docker cp <file-location> <container-name>:<container-path>- Copy a file from the local file system to a specified path within a container. -
docker exec <container-name> <command>- Execute a command inside a running container. -
docker build -t <username>/<container-name>:<tag>- Build an image from the Dockerfile. -
docker start <container-id>- Start an exited container. -
docker stop <container-id>- Stop a running container. -
docker pause <container-id>- Pause a running container. -
docker rm <container-id>- Remove a container. -
docker rmi <image-name>- Remove an image.