This is the second part of – SQL Server 2019 on Linux &Windows containers from zero to an hero!
In this blog series i will explain all you need to know about Docker architecture , Docker Hub, Pull image …
Docker architecture
https://docs.docker.com/get-started/overview/

1. Run the docker run hello-world command from the Docker
CLI client.
2. Docker CLI client makes API calls to the Docker daemon.
It passes the run subcommand to run a new container
based on the hello-world container image as a template .
3. Docker check whether it already has a local
copy of the hello-world container image in its local filesystem.
Since this is a brand-new installation, no local copy of the image
is available.
4. Because it doesn’t have a local copy of the hello-world container
image, the Docker daemon searched and pulled the image from
Docker Hub – a public repository of container images (#2 in the
output).
5. Once the download completes, the Docker daemon created
and ran a new container based on the hello-world image
(#3 in the output).
6. After the hello-world container completed the tasks it needs
to perform, the container exited or entered in a Stopped state
(#4 in the output).
docker run hello-world
Win 10:
docker run hello-world
same as
docker run hello-world:latest


Exploring Docker Hub
Search results for Docker images with names containing microsoft and sql
docker search microsoft | Select-String sql

Linux by using the grep command
docker search microsoft | grep sql
Look for SQL Server Containers on Docker hub
docker search mssql

Pull the SQL Server 2019 Linux container image from Microsoft Container Registry
Stores image in the local container registry’s filesystem.
Advantage:
- Running containers quickly: Docker daemon no longer has to wait for the image to be fully downloaded.
- Move the image to a disconnected network
Refer to Microsoft Container Registry (MCR) to download the image:
Docker pull mcr.microsoft.com/mssql/server:2019-latest docker images
docker images

docker pull microsoft/mssql-server-linux
docker pull docker.io/microsoft/mssql-server-linux:latest
docker search microsoft | Select-String mssql-server-linux
microsoft/mssql-server-linux is deprecated so delete the image
docker image rm 314918ddaedf

Delete images with same IMAGE ID different Tags
- Note: mcr.microsoft.com/mssql/server:2019-latest and mcr.microsoft.com/mssql/server: latest have same IMAGE ID and you cannot delete mcr.microsoft.com/mssql/server: latest


SQL Server on Linux image with image layers

| 171857c49d0f |
| 419640447d26 |
| 61e52f862619 |
| 5c34dee72c6d |
| 082df5860967 |
| a3812a9ddc69 |
| 9c34fde78761 |
| Build Time |
- Each Pull complete message represents a filesystem layer that makes up the entire image
- 64-character – represented by short 12-digit – hex .
Union Filesystem
- Allows you to take different file system layers and create a union of their contents,
- From Docker’s point of view ,regardless of how many layers there are, there’s just one image.
- implemented is through storage drivers
- On Linux overlay2, which is an improved version of OverlayFS.
Files, Directory Names
- Each filesystem layer that gets pulled from Docker Hub is stored in the Docker host’s local filesystem
- The location of the filesystem layers in the local disk depends on the storage driver
Linux
docker info | grep -w ‘Storage Driver:’
/var/lib/docker/overlay2 directory if you are using overlay2.

Windows Server 2019
docker info | Select-String “Storage Driver”

Enjoy (:
DAVID I.