
Explore how containerization, via Docker, delivers lightweight isolation by sharing a single kernel while packaging applications and dependencies in portable images, contrasting it with traditional virtual machines.
Explore docker, a container platform with the engine (daemon) and cli, enabling lightweight containers for resource efficiency. Use image-based deployments across dev, test, and production with ci/cd for consistent delivery.
Explore docker architecture and taxonomy, from docker client to cli and rest api. Learn core concepts: images, containers, networks, data volumes; registry and compose enable multi-container apps.
Install and configure Docker Desktop on Mac and Windows, then learn Docker CLI commands to work with images, containers, and port mapping while exploring WSL2 and Kubernetes.
Master docker commands to manage images and containers, from pulling and running hello world to inspecting, tagging, and pruning workflows across alpine and nginx environments.
Run daemon applications in containers with docker run -d and port mapping -p. Use docker ps, docker inspect, and docker logs to monitor nginx and other web services.
Learn how to enter a running Docker container with exec, view and modify the file system, test with curl, and persist changes by committing a new image.
Explore manually creating a docker image by copying files into a running nginx container with docker cp, then committing a new image and comparing to a dockerfile.
Learn to create docker images with a dockerfile based on nginx, set the working directory, copy context files, and leverage build caching and layered image creation.
Learn how CMD and entrypoint differ in dockerfiles: run can override CMD but not entrypoint, and when both are used, CMD becomes arguments to the entrypoint.
Learn how to build a Docker image from a published dotnet core output, configure ports, copy published files into a runtime image, and debug container startup using logs.
Learn how to build and publish inside the Docker image using the SDK base, optimize Docker cache by layering csproj restore first, and preview multi-stage Dockerfile concepts for .NET apps.
Learn to build and run a Node.js app with Docker: create a project, install npm dependencies, write a Dockerfile, and run the container with port mapping.
Master multi-stage dockerfiles to shrink images by copying build output to a runtime stage. Use stage naming and --target to pause at a stage in dotnet, java, and visual studio.
Explains advanced Docker commands for images and containers, including inspect, prune, history, diff, top, and stats, and covers saving, loading, exporting, importing, and using build args and environment variables.
Explore why docker volumes and bind mounts are essential to persist data across containers, illustrated by a counter app writing to a shared data folder.
Compare bind mounts, volumes, and tmpfs to persist data across Docker container instances. Learn why volumes are typically preferred for safe, Docker-controlled persistence, with cross-platform considerations.
Explains Docker bind mounts and the -v and --mount options, mapping host directories into containers, and the distinction between bind, volume, and tmpfs across Linux, Mac, and Windows.
Master docker volumes by switching from bind mounts to named volumes with -v or --mount, and map volumes to container paths for persistent data.
Explains how new docker volumes can be pre-populated by the container, contrasts volumes with bind mounts, and covers anonymous and named volumes, lifetime, and sharing data across containers.
Explore how docker networking connects containers on a single host via bridge networks, enables IP-based communication and port mapping, and extends to overlay, macvlan, and multi-host service communication.
Master docker compose to run multi-container apps by defining services, networks, and volumes in a yaml file, then build, up, and manage containers with port mappings.
Set and override environment variables in Docker Compose using host values and dot env files. Demonstrate container interaction with docker exec and container names for inter-container communication.
Push and pull Docker images to Docker Hub to deploy the same application across dev and production environments. Tag, login, push, and pull to manage private and public images.
Docker content trust uses digital signatures and signing keys, including offline keys and timestamp keys, to verify image tags and publisher and ensure only signed images are pulled.
Understanding Virtual Machines and Containers
What is a Virtual Machine
• A virtual machine is a computer file, typically called an image, which behaves like an actual computer – a computer within a computer
• It runs in a window, much like any other program, giving the end-user the same experience on a virtual machine as they would have on the host operating system itself.
• Multiple virtual machines can run simultaneously on the same physical computer.
What is Docker and its Benefits
• Docker is an open-source platform for developing, shipping and running applications by using containers.
• Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.
• With Docker, you can manage your infrastructure in the same ways you manage your applications.
The Docker platform uses the Docker Engine to quickly build and package apps as Docker images created using files written in the Dockerfile format that then is deployed and run in a layered container.
Benefits of Docker:
1. Resource Efficiency: Docker is lightweight and fast. Process level isolation and usage of the container host’s kernel is more efficient when compared to virtualizing an entire hardware server using VM.
Docker Architecture and its Taxonomy
Docker Engine is a client-server application with these major components:
• A server which is a type of long-running program called a daemon process.
• A REST API that specifies interfaces that programs can use to talk to the daemon and instruct it on what to do.
Create an Image Manually
Step 1: Update the Code
1. Create a New Project - HelloWebApp dotnet new MVC -n HelloWebApp
2. Add docker file as below Dockerfile
Azure Pipeline for Build and Publish Docker Image to Docker Hub
Azure Pipelines can be used to build images for any repository containing a Dockerfile. The building of both Linux and Windows containers is possible based on the agent platform used for the build.
Deploying to Web App
You can automatically deploy your application to an Azure Web App for Linux Containers after every successful build.