
Explore containers as a lightweight solution that packages an application with its libraries and dependencies into an isolated runtime environment, reducing conflicts and improving deployment.
Demonstrate port forwarding by exposing an nginx container on a docker host, mapping host port 3600 to container port 80, and accessing the web server via the public IP.
Learn how to create and start containers with docker container create and docker container run, compare their differences using diff, and copy files with docker container cp.
Explore docker export and import commands by turning a configured CentOS container into a tar archive and importing it on another host to recreate an image, and verify vsftpd.
Commit a running docker container to a new image with author and message, verify with docker image ls, then run a container from it and optionally push to Docker Hub.
Learn how to create and automate Docker images with a Dockerfile, detailing layers, layering, and the Docker build process using -f and -t flags, including centos7 as a base image.
Learn to label images with name, email, and address; set env variables with env; and run commands during image creation using Docker build.
Explore configuring a Docker container as an executable using entrypoint in a Dockerfile. Compare entrypoint with CMD and practice with ls and tree commands while building images and running containers.
Explore docker bridge networking with docker0 and veth, showing how containers reach the internet via the host and how -P maps container port 80 to a host port.
Learn how DNS works with a custom Docker bridge by creating two containers on a test bridge, then compare IP and hostname ping to reveal DNS resolution.
Learn how to install Docker Compose on Linux by running the download command, granting executable permission, creating the binary link, and testing the installation.
Learn to create a docker compose file in yml to deploy nginx webservers, map ports, and manage containers with docker-compose up, including multiple services and custom filenames.
Learn basic docker compose commands to manage containers, view status and ports with docker compose ps and docker container ls, and pause or unpause containers to control state.
Learn to run and scale two nginx web servers with docker compose, use the up command with the -f scale flag to scale, and inspect container processes with docker-compose top.
Build a custom nginx-based image with docker compose by creating a Dockerfile and docker-compose.yml, then run docker compose build and up -d with a volume that maps a host directory.
Section 1: Introduction
Introduction about containers
Installation of Docker
Create a first container
Fetch container image from docker hub
Run a container in backgroup, interactive with tty terminal
Delete exited dockers using a single command
Get complete details of a running container
Check logs & stats of a running container
Port forwarding
exec, rename & restart the running container
Attach a container
Kill/stop, pause/unpause a container
Create, start, cp command
Export/Import Command in Docker
Create a image from running container
Pull a specific version image from Docker hub
Image history, inspect & remove image
Section 2: Dockerfile
Overview of Dockerfile, layered architecture
Create a centos 7 image using Dockerfile
Overview of LABEL, ENV & RUN Command
Overview of WORKDIR
Copy, add command with their differences
Create a user account with password using dockerfile
CMD Command
SSH to a container
Overview of EXPOSE Command
ENTRYPOINT in Dockerfile
Section 3: Manage Data in Docker
Overview of managing data in Docker
Volumes
Create & attach a volume to a container
Delete volumes from the Docker host machine
Bind mounts
Section 4: Networking in Docker
Bridge networking
Run containers in custom created bridge networking
Enable communication between dockers belong to different bridge network
DNS enabled with custom bridge networking
Host networking
None networking
Connect one or more network to a running container
Create private docker registry
How to allow image in private registry for non-secure network
Section 5: Docker Compose
Overview of docker compose
Docker compose Installation
Create my first docker compose file
Create docker compose file in json language
Learn basic commands
docker-compose up
docker-compose down
docker-compose create
docker-compose start
docker-compose stop
docker-compose rm
docker-compose images
docker-compose ps
docker-compose pause
docker-compose unpause
docker-compose kill
docker-compose port <servername> port
docker-compose logs
docker-compose exec
docker-compose run
docker-compose scale
docker-compose top
Attach a volume & port mapping using docker compose
Build a custom image using docker compose
Last lecture