Test Engineer Docker Foundation

Posted by phpscriptcoder on Thu, 03 Feb 2022 06:54:58 +0100

1, docker overview

1. Why does docker appear

Essence: the emergence of all technologies is due to some problems that we need to solve before we study and learn;

Question:

Development environment, test environment, simulation environment, formal environment and many other environments need frequent service updates and environmental maintenance;

It is difficult to be completely consistent and unified in different environments due to cost problems, resulting in the unavailability of the same service in different environments;

Docker's solution to the above problems: pack, update and go online with the running environment. The core idea of docker is packing and packing. Each box is isolated from each other and does not affect each other.

2. docker, why fire

Core reason: docker is very lightweight. Because before the emergence of container technology, we used virtual technology.

Virtual machine: install a vmware virtual machine software on windows. Through this software, we can virtual multiple machines; In fact, virtual machine belongs to virtualization technology, and docker container technology also belongs to virtualization technology.

Comparison between virtual machine and docker:

Running a virtual machine with related software and hardware on it;
Container technology: the container shares the hardware resources related to the host. The container does not have its own kernel or any virtual hardware, so it is much lighter. Each container is isolated from each other and has its own file system, which does not affect each other;

3. docker advantages

  • Faster delivery and deployment of applications

    Traditional: a pile of help documents and installation programs;

    docker: package image, release test and run one piece;

  • More convenient upgrade and expansion

    After using docker, we deploy applications just like building blocks. The project is packaged into an image, which can easily expand container 1 and container 2

  • Simpler system maintenance

    After docker, our development environment, test environment and online environment are highly consistent;

  • More efficient utilization of computing resources

    docker is a kernel level virtualization technology, which can run multiple container instances on a physical machine. The performance of the server can be squeezed to the extreme;

2, docker installation

1. Basic composition of docker

![image-20210306142331618](/Users/zhaoyang/Library/Application Support/typora-user-images/image-20210306142331618.png)

  • Mirror (image)

    The docker image is like a target through which container services can be created. tomcat Image > Run > container

    For the server), multiple containers can be created through this image (the final service run or project run is in the container).

  • container

    Docker uses container technology to run one or a group of applications independently and create them through image

    Start, stop, delete, basic commands

    At present, this container can be understood as a simple Linux system.

  • repository

    The warehouse is where the image is stored!

    Warehouses are divided into public warehouses and private warehouses. (very similar to git)

    Docker Hub is foreign.

2. docker installation

Install directly using yum:

#View linux kernel version
[root@ecs-x-large-2-linux-20200305213344 ~]# uname -r
3.10.0-1160.6.1.el7.x86_64

#View system version details
[root@ecs-x-large-2-linux-20200305213344 ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

#Check whether docker is installed successfully
[root@ecs-x-large-2-linux-20200305213344 ~]# docker version
Client:
 Version:         1.13.1
 API version:     1.26
 Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      0be3e21/1.13.1
 Built:           Thu Nov 12 15:11:46 2020
 OS/Arch:         linux/amd64

Server:
 Version:         1.13.1
 API version:     1.26 (minimum version 1.12)
 Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
 Go version:      go1.10.3
 Git commit:      0be3e21/1.13.1
 Built:           Thu Nov 12 15:11:46 2020
 OS/Arch:         linux/amd64
 Experimental:    false
 
 #Test docker
 [root@ecs-x-large-2-linux-20200305213344 ~]# docker run hello-world
Unable to find image 'hello-world:latest' locally
Trying to pull repository docker.io/library/hello-world ...
latest: Pulling from docker.io/library/hello-world
b8dfde127a29: Pull complete
Digest: sha256:89b647c604b2a436fc3aa56ab1ec515c26b085ac0c15b0d105bc475be15738fb
Status: Downloaded newer image for docker.io/hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/
 
 #View the downloaded image
 [root@ecs-x-large-2-linux-20200305213344 ~]# docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
docker.io/hello-world   latest              d1165f221234        7 hours ago         13.3 kB
docker.io/nginx         latest              35c43ace9216        2 weeks ago         133 MB

3. docker operation principle

Docker is a system with client server structure. The daemon of docker runs on the host and is accessed from the client through socker. When the server receives the client command, it only executes this command.

 

3, docker common commands

1. Help command

docker version #Display dokcer version information
docker info #Displays the system information of docker, including the number of images and containers
docker command --help #Help command

2. Mirror command

docker images #View mirrors on all local hosts
docker search #Search for a mirror
docker pull #Download Image
docker rmi #delete mirror

docker images # view images on all local hosts

[root@ecs-x-large-2-linux-20200305213344 ~]# docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
docker.io/hello-world   latest              d1165f221234        7 hours ago         13.3 kB
docker.io/nginx         latest              35c43ace9216        2 weeks ago         133 MB
#explain

#REPOSITORY source of the REPOSITORY image
#TAG image label
#IMAGE ID image id
#CREATED image creation time
#SIZE mirror SIZE

#Optional
Options:
  -a, --all             Show all images (default hides intermediate images)#View all mirrors
  -q, --quiet           Only show numeric IDs #Display only image id
  
[root@ecs-x-large-2-linux-20200305213344 ~]# docker images -aq  #Show all mirror IDS
d1165f221234
35c43ace9216

docker pull # Download Image

#Download Image docker pull image name [: tag] if you do not write tag, the latest image will be downloaded by default
[root@ecs-x-large-2-linux-20200305213344 ~]# docker pull redis
Using default tag: latest
Trying to pull repository docker.io/library/redis ...
latest: Pulling from docker.io/library/redis
45b42c59be33: Already exists   #Layered Download
5ce2e937bf62: Pull complete
2a031498ff58: Pull complete
2f3d47096658: Pull complete
04f5cb8ac4c0: Pull complete
9ed141398658: Pull complete
Digest: sha256:9a1a2bb9fd2bd8b2c15aaca44d8e6ba8bc448df9b7b8d7d24ba4b472e0da1b8a
Status: Downloaded newer image for docker.io/redis:latest #Real address of the image

docker rmi # delete image

docker rmi -f image id #Deletes the specified image 
docker rmi -f image id image id #Deletes the specified image 
docker rmi -f $(docker images -aq) #Delete all mirrors

3. Container command

Note: we can only create containers with images

docker run image id #Create a new container and start 
docker ps #List all running containers 
docker rm container id #Delete specified container 
docker start container id #Start container 
docker restart container id #Restart container 
docker stop container id #Stop the currently running container 
docker kill container id #Force stop of current container
#View all container commands
[root@ecs-x-large-2-linux-20200305213344 ~]# docker container

Usage:	docker container COMMAND

Manage containers

Options:
      --help   Print usage

Commands:
  attach      Attach to a running container
  commit      Create a new image from a container's changes
  cp          Copy files/folders between a container and the local filesystem
  create      Create a new container
  diff        Inspect changes on a container's filesystem
  exec        Run a command in a running container
  export      Export a container's filesystem as a tar archive
  inspect     Display detailed information on one or more containers
  kill        Kill one or more running containers
  logs        Fetch the logs of a container
  ls          List containers
  pause       Pause all processes within one or more containers
  port        List port mappings or a specific mapping for the container
  prune       Remove all stopped containers
  rename      Rename a container
  restart     Restart one or more containers
  rm          Remove one or more containers
  run         Run a command in a new container
  start       Start one or more stopped containers
  stats       Display a live stream of container(s) resource usage statistics
  stop        Stop one or more running containers
  top         Display the running processes of a container
  unpause     Unpause all processes within one or more containers
  update      Update configuration of one or more containers
  wait        Block until one or more containers stop, then print their exit codes

Create a new container and start

docker runb [Optional parameters] image
#Parameter description
--name ="name" #Container name, which is used to distinguish different containers
-d #Background operation
-it #Run in interactive mode and enter the container to view relevant contents
-p #Specify container port
	-p Host port: container port
	
#Test it
[root@ecs-x-large-2-linux-20200305213344 ~]# docker run -it 300e315adb2f /bin/bash
[root@9f5b41ce646c /]# ls
bin  dev  etc  home  lib  lib64  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
[root@9f5b41ce646c /]# exit  #Exit container
exit

#Test -- name -p -d
[root@ecs-x-large-2-linux-20200305213344 ~]# docker run --name nginx01 -d -p 3334:80 35c43ace9216
cacf7a960d29dc24755f6b9896aaa85f2e9f902ff7f620470c907acf5e17bd7a
[root@ecs-x-large-2-linux-20200305213344 ~]# curl localhost:3334
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title> #Successfully accessed port 3334
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

#Whether the test runs in the background
[root@ecs-x-large-2-linux-20200305213344 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS                  NAMES
cacf7a960d29        35c43ace9216        "/docker-entrypoin..."   About a minute ago   Up About a minute   0.0.0.0:3334->80/tcp   nginx01

List all running containers

#docker ps #Lists the currently running containers
Options:
  -a, --all             Show all containers (default shows just running)#List all current containers
  -q, --quiet           Only display numeric IDs #Show container id only
  
[root@ecs-x-large-2-linux-20200305213344 ~]# docker ps -aq    #Show all container IDS
9f5b41ce646c
7aab85f14183

Exit container

exit #Exit container

Delete container

docker rm container id #Delete the specified container. You cannot delete the running container. If you want to forcibly delete rm -rf docker 
rm -f $(docker ps -aq) #Deletes the specified container 
docker ps -a -q|xargs docker rm #Delete all containers

Start and stop containers

docker start container id #Start container 
docker restart container id #Restart container 
docker stop container id #Stop the currently running container 
docker kill container id #Force stop of current container

view log

[root@ecs-x-large-2-linux-20200305213344 ~]# docker logs --help

Options:
      --details        Show extra details provided to logs
  -f, --follow         Follow log output
      --help           Print usage
      --since string   Show logs since timestamp
      --tail string    Number of lines to show from the end of the logs (default "all")
  -t, --timestamps     Show timestamps
  
#Show log
-tf #Display log information (always updated)
--tail number #Number of logs to be displayed
docker logs -t --tail n container id #see n Line log docker logs -ft container id #Follow the log

View process information in the container

#docker top container id 
[root@ecs-x-large-2-linux-20200305213344 ~]# docker top cacf7a960d29
UID                 PID                 PPID                C                   STIME               TTY                 TIME                CMD
root                27859               27841               0                   16:26               ?                   00:00:00            nginx: master process nginx -g daemon off;
101                 27908               27859               0                   16:26               ?                   00:00:00            nginx: worker process

View container metadata

#docker inspect container id
[root@ecs-x-large-2-linux-20200305213344 ~]# docker inspect cacf7a960d29
[
    {
        "Id": "cacf7a960d29dc24755f6b9896aaa85f2e9f902ff7f620470c907acf5e17bd7a",
        "Created": "2021-03-06T08:26:19.015315592Z",
        "Path": "/docker-entrypoint.sh",
        "Args": [
            "nginx",
            "-g",
            "daemon off;"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 27859,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2021-03-06T08:26:19.32665951Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:35c43ace9216212c0f0e546a65eec93fa9fc8e96b25880ee222b7ed2ca1d2151",
        "ResolvConfPath": "/var/lib/docker/containers/cacf7a960d29dc24755f6b9896aaa85f2e9f902ff7f620470c907acf5e17bd7a/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/cacf7a960d29dc24755f6b9896aaa85f2e9f902ff7f620470c907acf5e17bd7a/hostname",
        "HostsPath": "/var/lib/docker/containers/cacf7a960d29dc24755f6b9896aaa85f2e9f902ff7f620470c907acf5e17bd7a/hosts",
        "LogPath": "",
        "Name": "/nginx01",
        "RestartCount": 0,
        "Driver": "overlay2",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {

Enter the currently running container

#We usually run the container in the background. If we need to modify some configurations or other operations, we need to enter the running container
#Method 1: docker exec - it container id /bin/bash
[root@ecs-x-large-2-linux-20200305213344 ~]# docker exec -it cacf7a960d29 /bin/bash
root@cacf7a960d29:/# ls
bin   dev		   docker-entrypoint.sh  home  lib64  mnt  proc  run   srv  tmp  var
boot  docker-entrypoint.d  etc			 lib   media  opt  root  sbin  sys  usr
#Method 2: docker attach container id
[root@ecs-x-large-2-linux-20200305213344 ~]# docker attach cacf7a960d29
 Executing code******
[root@ecs-x-large-2-linux-20200305213344 ~]#  #ctrl+c exit
#difference
#docker exec #After entering the current container, open a new terminal, which can be operated inside. (common)
#docker attach # Enter the terminal where the container is executing

Copy from container to host

#docker cp container id: path in container host destination path

#test
#Enter the inside of the container
[root@ecs-x-large-2-linux-20200305213344 ~]# docker exec -it cacf7a960d29 /bin/bash
root@cacf7a960d29:/# ls
bin   dev		   docker-entrypoint.sh  home  lib64  mnt  proc  run   srv  tmp  var
boot  docker-entrypoint.d  etc			 lib   media  opt  root  sbin  sys  usr
#Create a new file
root@cacf7a960d29:/# echo "hello" >test.java
root@cacf7a960d29:/# ls
bin   dev		   docker-entrypoint.sh  home  lib64  mnt  proc  run   srv  test.java  usr
boot  docker-entrypoint.d  etc			 lib   media  opt  root  sbin  sys  tmp        var
#Exit container
exit
#Copy
docker cp cacf7a960d29:test.java /home/
#Verify copy to host
[root@ecs-x-large-2-linux-20200305213344 ~]# ls /home/
test.java

commit image

Command: docker commit -m=""Description" -a="Author container id Target image name:[tag]

Actual test:
#1. Start tomcat default image file
[root@ecs-x-large-2-linux-20200305213344 ~]# docker run -d -p 3344:8080 bf4709e77b18
7984fe235242c4164dcede5053663a44db96ae89e0035a13e351faab03634d17
#2. View the webapp file of the container
[root@ecs-x-large-2-linux-20200305213344 ~]# docker exec -it 7984fe235242c4164dcede5053663a44db96ae89e0035a13e351faab03634d17 /bin/bash
root@7984fe235242:/usr/local/tomcat# ls
BUILDING.txt	 LICENSE  README.md	 RUNNING.txt  conf  logs	    temp     webapps.dist
CONTRIBUTING.md  NOTICE   RELEASE-NOTES  bin	      lib   native-jni-lib  webapps  work
root@7984fe235242:/usr/local/tomcat# cd webapps
root@7984fe235242:/usr/local/tomcat/webapps# ls
#3. Copy webapps Dist file to webapps
root@7984fe235242:/usr/local/tomcat# cp -r webapps.dist/* webapps/
root@7984fe235242:/usr/local/tomcat# ls webapps
ROOT  docs  examples  host-manager  manager
root@7984fe235242:/usr/local/tomcat#
#4. Commit the container as a new image file
[root@ecs-x-large-2-linux-20200305213344 ~]# docker commit -m = "Fanxiang test container is submitted as a new image" - a="fanxiang" 7984fe235242c4164dcede5053 tomcat01:1.0
sha256:3622a772f2315dc2d22140698a45cc8c30a9c8b5e7fb961937429307669ced92
[root@ecs-x-large-2-linux-20200305213344 ~]# docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
tomcat01                1.0                 3622a772f231        12 seconds ago      672 MB
docker.io/hello-world   latest              d1165f221234        2 days ago          13.3 kB
docker.io/redis         5.0                 d00afcde654e        5 days ago          98.4 MB
docker.io/redis         latest              f877e80bb9ef        5 days ago          105 MB
docker.io/nginx         latest              35c43ace9216        2 weeks ago         133 MB
docker.io/tomcat        latest              bf4709e77b18        3 weeks ago         667 MB
docker.io/centos        latest              300e315adb2f        3 months ago        209 MB

save image

[root@ecs-x-large-2-linux-20200305213344 ~]#docker save --help
Usage:	docker save [OPTIONS] IMAGE [IMAGE...]
Save one or more images to a tar archive (streamed to STDOUT by default)
Options:
      --help            Print usage
  -o, --output string   Write to a file, instead of STDOUT
  
Actual combat:
[root@ecs-x-large-2-linux-20200305213344 ~]# docker save -o /home/redis01.tar docker.io/redis:5.0
[root@ecs-x-large-2-linux-20200305213344 ~]# ls /home
redis01.tar  test.java  tomcat02.tar

load image

[root@ecs-x-large-2-linux-20200305213344 ~]# docker load --help
Usage:	docker load [OPTIONS]
Load an image from a tar archive or STDIN
Options:
      --help           Print usage
  -i, --input string   Read from tar archive file, instead of STDIN
  -q, --quiet          Suppress the load output
 Actual combat:

[root@ecs-x-large-2-linux-20200305213344 ~]# docker load -i /home/redis01.tar
01b7eeecc774: Loading layer [==================================================>]  24.7 MB/24.7 MB
f2df42e57d5e: Loading layer [==================================================>] 1.536 kB/1.536 kB
b537eb7339bc: Loading layer [==================================================>] 3.584 kB/3.584 kB
Loaded image: docker.io/redis:5.0
[root@ecs-x-large-2-linux-20200305213344 ~]# docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
docker.io/hello-world   latest              d1165f221234        2 days ago          13.3 kB
docker.io/redis         5.0                 d00afcde654e        5 days ago          98.4 MB
docker.io/redis         latest              f877e80bb9ef        5 days ago          105 MB
docker.io/nginx         latest              35c43ace9216        2 weeks ago         133 MB
docker.io/tomcat        latest              bf4709e77b18        3 weeks ago         667 MB
docker.io/centos        latest              300e315adb2f        3 months ago        209 MB

4. Command summary

![image-20210306164709448](/Users/zhaoyang/Library/Application Support/typora-user-images/image-20210306164709448.png)

4, docker image

1. What is mirroring

Image is a lightweight and executable independent software package, which is used to package the software running environment and the software developed based on the running environment. It contains all the contents required to run a software, including code, runtime library, environment variables and configuration price.

All applications and environments can be directly packaged into images and run directly.

2. Mirror layering principle

The image of docker is actually composed of a layer by layer file system, which is called UnionFS. Usually, the CentOS installed into the virtual machine are several G's. why is docker only 200M here?

For a streamlined OS,rootfs It can be very small. You only need to package the most basic commands, tools and program libraries, because the bottom layer is used directly Host of kernel,You only need to provide rootfs That's it. This shows that for different Linux Distribution, boots Basically the same, rootfs There will be differences, so different distributions can be shared bootfs. The virtual machine is at the minute level and the container is at the second level!

3. Hierarchical understanding

[root@ecs-x-large-2-linux-20200305213344 ~]# docker pull redis:5.0
Trying to pull repository docker.io/library/redis ...
5.0: Pulling from docker.io/library/redis
45b42c59be33: Already exists
5ce2e937bf62: Already exists
2a031498ff58: Already exists
ec50b60c87ea: Pull complete
2bf0c804a5c0: Pull complete
6a3615492950: Pull complete
Digest: sha256:6ba62effb31d8d74e6e2dec4b7ef9c8985e7fcc85c4f179e13f622f5785a4135
Status: Downloaded newer image for docker.io/redis:5.0

Why does docker image adopt this hierarchical structure?

The biggest benefit, I think, is resource sharing! For example, if multiple images are built from the same Base image, the host
Only one base image needs to be kept on the disk, and only one base image needs to be loaded in memory, so that all containers can be saved
Services, and every layer of the image can be shared.

Summary:
All Docker images start from a basic image layer. When modifying or adding new content, they will be in the current image layer
On the, create a new mirror layer. Docker images are read-only. When the container starts, a new writable layer is loaded on the top of the image! This layer is what we usually call the container layer. What is under the container is called the mirror layer!

View docker image hierarchy information

Command: docker inspect image id or image name

[root@ecs-x-large-2-linux-20200305213344 ~]# docker inspect d00afcde654e
[
    {
        "Id": "sha256:d00afcde654e3125384d52fb872c88986d2046fa598a12abcee52ff0d98e7562",
        "RepoTags": [
            "docker.io/redis:5.0"
        ],
        "RepoDigests": [
            "docker.io/redis@sha256:6ba62effb31d8d74e6e2dec4b7ef9c8985e7fcc85c4f179e13f622f5785a4135"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2021-03-02T23:29:46.396151327Z",
        "Container": "6a7820655f2592fdc2b254036170652520beb98f79a41e6aedc17987ccec3829",
        "ContainerConfig": {
            "Hostname": "6a7820655f25",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "6379/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "GOSU_VERSION=1.12",
                "REDIS_VERSION=5.0.12",
                "REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-5.0.12.tar.gz",
                "REDIS_DOWNLOAD_SHA=7040eba5910f7c3d38f05ea5a1d88b480488215bdbd2e10ec70d18380108e31e"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "#(nop) ",
                "CMD [\"redis-server\"]"
            ],
            "Image": "sha256:f43399b52be67a391b4bf53e210c55002a2bce5e4fa5f1021d4dc9725ec7f537",
            "Volumes": {
                "/data": {}
            },
            "WorkingDir": "/data",
            "Entrypoint": [
                "docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {}
        },
        "DockerVersion": "19.03.12",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "6379/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "GOSU_VERSION=1.12",
                "REDIS_VERSION=5.0.12",
                "REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-5.0.12.tar.gz",
                "REDIS_DOWNLOAD_SHA=7040eba5910f7c3d38f05ea5a1d88b480488215bdbd2e10ec70d18380108e31e"
            ],
            "Cmd": [
                "redis-server"
            ],
            "Image": "sha256:f43399b52be67a391b4bf53e210c55002a2bce5e4fa5f1021d4dc9725ec7f537",
            "Volumes": {
                "/data": {}
            },
            "WorkingDir": "/data",
            "Entrypoint": [
                "docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 98358570,
        "VirtualSize": 98358570,
        "GraphDriver": {
            "Name": "overlay2",
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/343be33bc297acdf8bc2b57b335c025ea76b8d1263548ba269c0aefb81aaf28d/diff:/var/lib/docker/overlay2/3302ce8415cd3a8a1e1e9753eebbb38df5b15cc02fef109e30be41f4310ee810/diff:/var/lib/docker/overlay2/44c8b45db6fd63960703e604f43a4acc5633f09a3a91a8d7263ad2f9bfd0d038/diff:/var/lib/docker/overlay2/5eb368e142c6079aa1f507149216281ca79b5df08ba19bad51390d74dfbf3c1f/diff:/var/lib/docker/overlay2/219cf0492ba08d03dc4f2a5649ec1124fff82ebe22c6f9a0a26ccf303be0e0d1/diff",
                "MergedDir": "/var/lib/docker/overlay2/d38f31592715a55459f4556623786c5878014bf8ffdcc1e88506069e32ba75dc/merged",
                "UpperDir": "/var/lib/docker/overlay2/d38f31592715a55459f4556623786c5878014bf8ffdcc1e88506069e32ba75dc/diff",
                "WorkDir": "/var/lib/docker/overlay2/d38f31592715a55459f4556623786c5878014bf8ffdcc1e88506069e32ba75dc/work"
            }
        },
        "RootFS": {
            "Type": "layers",  
            "Layers": [     #Mirror layered information
                "sha256:9eb82f04c782ef3f5ca25911e60d75e441ce0fe82e49f0dbf02c81a3161d1300",
                "sha256:f973e3e0e07c6e9f9418a6dd0c453cd70c7fb87a0826172275883ab4bdb61bf4",
                "sha256:c16b4f3a3f99ebbcd59795b54faf4cdf2e00ee09b85124fda5d0746d64237ca6",
                "sha256:01b7eeecc774b7669892f89fc8b84eea781263448978a411f0f429b867410fc5",
                "sha256:f2df42e57d5eef289656ef8aad072d2828a61e93833e2928a789a88bc2bc1cbc",
                "sha256:b537eb7339bcbff729ebdc63a0f910b39ae3d5540663a74f55081b62e92f66e3"
            ]
        }
    }
]