什么是docker
docker中的容器:
- lxc --> libcontainer --> runC
OCI&OCF
OCI
Open Container-initiative
- 由Linux基金会主导于2015年6月创立
- 旨在围绕容器格式和运行时制定一个开放的工业化标准
- contains two specifications
- the Runtime Specification(runtime-spec)
运行时规范(运行时规范) - the Image Specification(image-spec)
图像规格(图像规格)
- the Runtime Specification(runtime-spec)
OCF
Open Container Format
开放容器格式
runC是一个CLI工具,用于根据OCI规范生成和运行容器
-
容器作为runC的子进程启动,可以嵌入到各种其他系统中,而无需运行守护进程
-
runC构建在libcontainer上,这项容器技术为数百万Docker引擎安装提供了动力
docker提供了一个专门容纳容器镜像的站点
docker架构
docker镜像与镜像仓库
为什么镜像仓库名字是Registry而不是repository?在docker中仓库的名字是以应用的名称取名的。
镜像是静态的,而容器是动态的,容器有其生命周期,镜像与容器的关系类似于程序与进程的关系。镜像类似于文件系统中的程序文件,而容器则类似于将一个程序运行起来的状态,也即进程。所以容器是可以删除的,容器被删除后其镜像是不会被删除的。
docker对象
使用docker时,您正在创建和使用图像、容器、网络、卷、插件和其他对象。
图像
-
图像是只读模板,其中包含创建docker容器的说明。
-
通常,一个图像基于另一个图像,并进行一些额外的自定义。
-
您可以创建自己的图像,也可以只使用其他人创建并在注册表中发布的图像。
容器
-
conntainer是映像的可运行实例。
-
您可以使用docker API或CLI创建、运行、停止、移动或删除容器。
-
您可以将容器连接到一个或多个网络,将存储连接到容器,甚至可以基于其当前状态创建新映像。
安装及使用docker
docker安装
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
CentOS-Stream-AppStream.repo CentOS-Stream-HighAvailability.repo
CentOS-Stream-BaseOS.repo CentOS-Stream-Media.repo
CentOS-Stream-Debuginfo.repo CentOS-Stream-PowerTools.repo
CentOS-Stream-Extras.repo CentOS-Stream-RealTime.repo
[root@localhost yum.repos.d]# curl -o docker-ce.repo https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1919 100 1919 0 0 8802 0 --:--:-- --:--:-- --:--:-- 8802
[root@localhost yum.repos.d]# ls
CentOS-Stream-AppStream.repo CentOS-Stream-Media.repo
CentOS-Stream-BaseOS.repo CentOS-Stream-PowerTools.repo
CentOS-Stream-Debuginfo.repo CentOS-Stream-RealTime.repo
CentOS-Stream-Extras.repo docker-ce.repo
CentOS-Stream-HighAvailability.repo
[root@localhost yum.repos.d]# sed -i 's@https://download.docker.com@https://mirrors.tuna.tsinghua.edu.cn/docker-ce@g' docker-ce.repo
[root@localhost yum.repos.d]# yum -y install docker-ce
docker加速
docker-ce的配置文件是/etc/docker/daemon.json,此文件默认不存在,需要我们手动创建并进行配置,而docker的加速就是通过配置此文件来实现的。
docker的加速有多种方式:
- docker cn
- 中国科技大学加速器
- 阿里云加速器(需要通过阿里云开发者平台注册帐号,免费使用个人私有的加速器)
[root@localhost yum.repos.d]# systemctl enable --now docker
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
[root@localhost yum.repos.d]# mkdir -p /etc/docker
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]# tee /etc/docker/daemon.json <<-'EOF'
> {
> "registry-mirrors": ["https://1aq1u7oh.mirror.aliyuncs.com"]
> }
> EOF
{
"registry-mirrors": ["https://1aq1u7oh.mirror.aliyuncs.com"]
}
[root@localhost yum.repos.d]# cd /etc/docker
[root@localhost docker]# ls
daemon.json key.json
docker常用操作
命令 | 功能 |
---|---|
docker search | Search the Docker Hub for images |
docker pull | Pull an image or a repository from a registry |
docker images | List images |
docker create | Create a new conntainer |
docker start | Start one or more stopped containers |
docker run | Run a command in a new container |
docker attach | Attach to a runninng container |
docker ps | List containers |
docker logs | Fetch the logs of a container |
docker restart | Restart a container |
docker stop | Stop one or more running containers |
docker kill | Kill one or more running containers |
docker rm | Remove onne or more containers |
docker exec | Run a command in a running container |
docker info | Display system-wide information |
docker inspect | Return low-level information on Docker objects |
docker event state
docker search:在Docker Hub中搜索图像
[root@localhost ~]# docker search nginx
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
nginx Official build of Nginx. 15899 [OK]
jwilder/nginx-proxy Automated Nginx reverse proxy for docker con… 2098 [OK]
richarvey/nginx-php-fpm Container running Nginx + PHP-FPM capable of… 819 [OK]
jc21/nginx-proxy-manager Docker container for managing Nginx proxy ho… 285
linuxserver/nginx An Nginx container, brought to you by LinuxS… 160
tiangolo/nginx-rtmp Docker image with Nginx using the nginx-rtmp… 146 [OK]
jlesage/nginx-proxy-manager Docker container for Nginx Proxy Manager 144 [OK]
alfg/nginx-rtmp NGINX, nginx-rtmp-module and FFmpeg from sou… 110 [OK]
nginxdemos/hello NGINX webserver that serves a simple page co… 79 [OK]
privatebin/nginx-fpm-alpine PrivateBin running on an Nginx, php-fpm & Al… 60 [OK]
nginx/nginx-ingress NGINX and NGINX Plus Ingress Controllers fo… 57
nginxinc/nginx-unprivileged Unprivileged NGINX Dockerfiles 54
nginxproxy/nginx-proxy Automated Nginx reverse proxy for docker con… 28
staticfloat/nginx-certbot Opinionated setup for automatic TLS certs lo… 25 [OK]
nginx/nginx-prometheus-exporter NGINX Prometheus Exporter for NGINX and NGIN… 22
schmunk42/nginx-redirect A very simple container to redirect HTTP tra… 19 [OK]
centos/nginx-112-centos7 Platform for running nginx 1.12 or building … 16
centos/nginx-18-centos7 Platform for running nginx 1.8 or building n… 13
flashspys/nginx-static Super Lightweight Nginx Image 11 [OK]
mailu/nginx Mailu nginx frontend 9 [OK]
navidonskis/nginx-php5.6 Docker nginx + php5.6 on Ubuntu 7 [OK]
sophos/nginx-vts-exporter Simple server that scrapes Nginx vts stats a… 7 [OK]
ansibleplaybookbundle/nginx-apb An APB to deploy NGINX 3 [OK]
arnau/nginx-gate Docker image with Nginx with Lua enabled on … 1 [OK]
wodby/nginx Generic nginx 1 [OK]
docker pull:从注册表中拉出映像或存储库
//不指定版本
[root@localhost ~]# docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
eff15d958d66: Pull complete
1e5351450a59: Pull complete
2df63e6ce2be: Pull complete
9171c7ae368c: Pull complete
020f975acd28: Pull complete
266f639b35ad: Pull complete
Digest: sha256:097c3a0913d7e3a5b01b6c685a60c03632fc7a2b50bc8e35bcaa3691d788226e
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest
//指定版本
[root@localhost ~]# docker pull httpd:2.4.51
2.4.51: Pulling from library/httpd
eff15d958d66: Already exists
ba1caf8ba86c: Pull complete
ab86dc02235d: Pull complete
0d58b11d2867: Pull complete
e88da7cb925c: Pull complete
Digest: sha256:1d71eef54c08435c0be99877c408637f03112dc9f929fba3cccdd15896099b02
Status: Downloaded newer image for httpd:2.4.51
docker.io/library/httpd:2.4.51
docker images:图片列表
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
httpd 2.4.51 ad17c88403e2 13 days ago 143MB
nginx latest ea335eea17ab 2 weeks ago 141MB
docker create:创建一个新的容器
[root@localhost ~]# docker create nginx
9b90e365954a0358e59d93fb0c1693c2c3d1a99c1c6a2f5611731cedb147c7b0
[root@localhost ~]# docker create httpd:2.4.51
0c61126dffab92f585b986b6852469928c448a884dea38212124345510d6fbb5
docker start:启动一个或多个停止的容器
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0c61126dffab httpd:2.4.51 "httpd-foreground" About a minute ago Created exciting_hodgkin
9b90e365954a nginx "/docker-entrypoint.…" About a minute ago Created gracious_ganguly
[root@localhost ~]# docker start 9b90e365954a
9b90e365954a
docker run:在新容器中运行命令
[root@localhost ~]# docker run -it nginx /bin/bash
root@852e2c5cb89e:/# ls
bin docker-entrypoint.d home media proc sbin tmp
boot docker-entrypoint.sh lib mnt root srv usr
dev etc lib64 opt run sys var
root@852e2c5cb89e:/#
docker attach:附加到一个运行的容器
[root@localhost ~]# docker attach frosty_noether
root@852e2c5cb89e:/# exit
exit
docker ps:列表容器
//启动容器
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9b90e365954a nginx "/docker-entrypoint.…" 6 minutes ago Up 4 minutes 80/tcp gracious_ganguly
//全部容器
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
852e2c5cb89e nginx "/docker-entrypoint.…" 3 minutes ago Exited (0) 2 minutes ago frosty_noether
0c61126dffab httpd:2.4.51 "httpd-foreground" 6 minutes ago Created exciting_hodgkin
9b90e365954a nginx "/docker-entrypoint.…" 6 minutes ago Up 4 minutes 80/tcp gracious_ganguly
docker logs:获取容器的日志
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9b90e365954a nginx "/docker-entrypoint.…" 8 minutes ago Up 5 minutes 80/tcp gracious_ganguly
[root@localhost ~]# docker logs 9b90e365954a
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2021/12/02 04:23:54 [notice] 1#1: using the "epoll" event method
2021/12/02 04:23:54 [notice] 1#1: nginx/1.21.4
2021/12/02 04:23:54 [notice] 1#1: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
docker restart:重启一个容器
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9b90e365954a nginx "/docker-entrypoint.…" 9 minutes ago Up 7 minutes 80/tcp gracious_ganguly
[root@localhost ~]# docker restart 9b90e365954a
9b90e365954a
docker stop:停止一个或多个运行中的容器
[root@localhost ~]# docker stop 9b90e365954a
9b90e365954a
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
docker kill:杀死一个或多个运行中的容器
[root@localhost ~]# docker kill 9b90e365954a
9b90e365954a
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
852e2c5cb89e nginx "/docker-entrypoint.…" 9 minutes ago Exited (0) 7 minutes ago frosty_noether
0c61126dffab httpd:2.4.51 "httpd-foreground" 12 minutes ago Created exciting_hodgkin
9b90e365954a nginx "/docker-entrypoint.…" 12 minutes ago Exited (137) 14 seconds ago gracious_ganguly
docker rm:取出一个或多个容器
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
852e2c5cb89e nginx "/docker-entrypoint.…" 9 minutes ago Exited (0) 7 minutes ago frosty_noether
0c61126dffab httpd:2.4.51 "httpd-foreground" 12 minutes ago Created exciting_hodgkin
9b90e365954a nginx "/docker-entrypoint.…" 12 minutes ago Exited (137) 14 seconds ago gracious_ganguly
[root@localhost ~]# docker rm 9b90e365954a
9b90e365954a
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
852e2c5cb89e nginx "/docker-entrypoint.…" 10 minutes ago Exited (0) 9 minutes ago frosty_noether
0c61126dffab httpd:2.4.51 "httpd-foreground" 13 minutes ago Created exciting_hodgkin
docker exec:在运行容器中运行命令
[root@localhost ~]# docker start 852e2c5cb89e
852e2c5cb89e
[root@localhost ~]# docker exec -it 852e2c5cb89e /bin/bash
root@852e2c5cb89e:/# ls
bin docker-entrypoint.d home media proc sbin tmp
boot docker-entrypoint.sh lib mnt root srv usr
dev etc lib64 opt run sys var
root@852e2c5cb89e:/# exit
exit
docker info:显示整个系统的信息
[root@localhost ~]# docker info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.6.3-docker)
scan: Docker Scan (Docker Inc., v0.9.0)
Server:
Containers: 2
Running: 1
Paused: 0
Stopped: 1
Images: 2
Server Version: 20.10.11
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
runc version: v1.0.2-0-g52b36a2
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 4.18.0-257.el8.x86_64
Operating System: CentOS Stream 8
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.748GiB
Name: localhost.localdomain
ID: FGDZ:JSDS:HQU4:WBBN:VHAA:MFKW:DPKB:QWKE:AMRC:5MM4:W74B:TVGE
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
docker inspect:返回Docker对象的低级信息
[root@localhost ~]# docker inspect 852e2c5cb89e
[
{
"Id": "852e2c5cb89e7c88164484048210cecfa45a9b9d8cb197e69a64781875750c2d",
"Created": "2021-12-02T04:24:58.667201593Z",
"Path": "/docker-entrypoint.sh",
"Args": [
"/bin/bash"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 62870,
"ExitCode": 0,
"Error": "",
"StartedAt": "2021-12-02T04:36:31.166524699Z",
"FinishedAt": "2021-12-02T04:26:16.485448769Z"
},
"Image": "sha256:ea335eea17ab984571cd4a3bcf90a0413773b559c75ef4cda07d0ce952b00291",
"ResolvConfPath": "/var/lib/docker/containers/852e2c5cb89e7c88164484048210cecfa45a9b9d8cb197e69a64781875750c2d/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/852e2c5cb89e7c88164484048210cecfa45a9b9d8cb197e69a64781875750c2d/hostname",
"HostsPath": "/var/lib/docker/containers/852e2c5cb89e7c88164484048210cecfa45a9b9d8cb197e69a64781875750c2d/hosts",
"LogPath": "/var/lib/docker/containers/852e2c5cb89e7c88164484048210cecfa45a9b9d8cb197e69a64781875750c2d/852e2c5cb89e7c88164484048210cecfa45a9b9d8cb197e69a64781875750c2d-json.log",
"Name": "/frosty_noether",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "host",
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/50b3f3d3e8d5cfcf88a82cc7f55963b4e4922fba8cf4dca0abe4668b668c75c7-init/diff:/var/lib/docker/overlay2/1c62a9ae8d0f437737b475062b70c13e5fb0a5945f1cdbadaf736014d948537f/diff:/var/lib/docker/overlay2/1a2b0c525376186b2a4f2de42b51c5a7f1d05d1b0b25305b9004b5c870a01a5f/diff:/var/lib/docker/overlay2/8fe8d8493a40050f1d65a9cbe1d50d80fa0521cf54d06800d060c5609037e622/diff:/var/lib/docker/overlay2/3ef08374d94274c782dd8ed57a83aace3a152008c4bf9a2919b77a61524178e2/diff:/var/lib/docker/overlay2/47e8adb24d7dd6da223dcb9a0ec847a1b9cd7a9e20df505889d8724d8f295788/diff:/var/lib/docker/overlay2/d82147747145013d4f4cfc424d7a6dc96da1d47719d190caaaaa85eaa3f2e6ca/diff",
"MergedDir": "/var/lib/docker/overlay2/50b3f3d3e8d5cfcf88a82cc7f55963b4e4922fba8cf4dca0abe4668b668c75c7/merged",
"UpperDir": "/var/lib/docker/overlay2/50b3f3d3e8d5cfcf88a82cc7f55963b4e4922fba8cf4dca0abe4668b668c75c7/diff",
"WorkDir": "/var/lib/docker/overlay2/50b3f3d3e8d5cfcf88a82cc7f55963b4e4922fba8cf4dca0abe4668b668c75c7/work"
},
"Name": "overlay2"
},
"Mounts": [],
"Config": {
"Hostname": "852e2c5cb89e",
"Domainname": "",
"User": "",
"AttachStdin": true,
"AttachStdout": true,
"AttachStderr": true,
"ExposedPorts": {
"80/tcp": {}
},
"Tty": true,
"OpenStdin": true,
"StdinOnce": true,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"NGINX_VERSION=1.21.4",
"NJS_VERSION=0.7.0",
"PKG_RELEASE=1~bullseye"
],
"Cmd": [
"/bin/bash"
],
"Image": "nginx",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": [
"/docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {
"maintainer": "NGINX Docker Maintainers <docker-maint@nginx.com>"
},
"StopSignal": "SIGQUIT"
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "600ffbea4391351757aac82d10e580b974e4a993adf73328088fe47b645ffa11",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"80/tcp": null
},
"SandboxKey": "/var/run/docker/netns/600ffbea4391",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "9494f8c3eb57e153a2c49600f0d5b25be9a7aeb6b85311fd1937d5402a484e2f",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:02",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "f72ac4a19fe4e30bec4acedf7c09baaf1727f906fa7353a977dddf0a7a8b074f",
"EndpointID": "9494f8c3eb57e153a2c49600f0d5b25be9a7aeb6b85311fd1937d5402a484e2f",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02",
"DriverOpts": null
}
}
}
}
]