Docker System Basics

basics of docker system

The basic components of the Docker system are: - Images: Blueprints of the application and its dependencies. - Containers: Running instances of images. - Volumes: Persistent data storage. - Networks: Isolated environments for containers to communicate. - Dockerfile: A file used to create Docker images.

Docker Hello World Example

docker run hello-world

This command pulls the hello-world image from Docker Hub and runs it in a container.

Running Ubuntu in a Container

docker run -it ubuntu bash

The -it flag starts the container in interactive mode with a terminal attached. This runs an Ubuntu image with the Bash shell.