当前位置:   article > 正文

Docker 通过Dockerfile 配置Nginx + PHP + Redis环境_编写一个安装 nginx php mysql redis 的dockerfile文件

编写一个安装 nginx php mysql redis 的dockerfile文件

创建目录dockerfile ,包含php,nginx,redis 对应的dockerfile文件,mysql是直接安装在电脑上。

Nginx:Dockerfile

  1. FROM nginx:latest
  2. # 镜像信息
  3. LABEL authors="wang"
  4. # 设置工作目录
  5. WORKDIR /var/wwwroots
  6. # 端口
  7. EXPOSE 80
  8. CMD ["nginx", "-g", "daemon off;"]

运行dockerfile,这里是在phpstorm中编辑运行的,下面是启动配置页面。

Redis:Dockerfile

  1. FROM redis:5.0
  2. # 镜像信息
  3. LABEL authors="wang"
  4. # 对外暴露Redis默认端口6379
  5. EXPOSE 6379
  6. # 启动Redis服务器
  7. CMD [ "redis-server", "/etc/redis/redis.conf" ]

PHP:Dockerfile

  1. FROM php:7.4-fpm
  2. # 镜像信息
  3. LABEL authors = "wang"
  4. # 设置env配置
  5. # 设置时区
  6. ENV TZ = Asia/Shanghai
  7. # 更换为阿里云镜像,更新软件包列表
  8. RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
  9. sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
  10. apt-get update && \
  11. apt-get upgrade -y
  12. # 安装依赖
  13. RUN docker-php-ext-install pdo_mysql mysqli pdo
  14. RUN docker-php-ext-install tokenizer
  15. RUN docker-php-ext-install json
  16. RUN docker-php-ext-install bcmath
  17. RUN docker-php-ext-install fileinfo
  18. RUN docker-php-ext-install pcntl
  19. RUN docker-php-ext-install sockets
  20. # 安装zip扩展 需要放到phpredis之前
  21. RUN apt-get install -y zip unzip libzip-dev && \
  22. docker-php-ext-install zip
  23. # 安装phpredis扩展
  24. RUN apt-get install -y git && \
  25. git clone https://github.com/phpredis/phpredis.git /usr/src/php/ext/phpredis && \
  26. docker-php-ext-configure phpredis && \
  27. docker-php-ext-install phpredis && \
  28. apt-get purge -y --auto-remove git && \
  29. rm -rf /usr/src/php/ext/phpredis
  30. # 安装XML扩展
  31. RUN apt-get install -y libxml2 libxml2-dev && \
  32. docker-php-ext-install xml
  33. # 安装intl扩展
  34. RUN apt-get install -y libicu-dev \
  35. && docker-php-ext-install intl
  36. # 安装cURL扩展
  37. RUN apt-get install -y libcurl4-openssl-dev && \
  38. docker-php-ext-install curl
  39. # 安装gd库
  40. RUN apt-get install -y libwebp-dev libjpeg-dev libpng-dev libfreetype6-dev && \
  41. docker-php-ext-configure gd --with-freetype --with-jpeg && \
  42. docker-php-ext-install gd
  43. # 清理缓存
  44. RUN apt-get clean \
  45. && rm -rf /var/lib/apt/lists/*
  46. # 安装composer
  47. RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  48. # 设置工作目录
  49. WORKDIR /var/wwwroots
  50. # 端口
  51. EXPOSE 9000
  52. # 设置容器启动时执行的命令
  53. CMD ["php-fpm"]

Docker 通过Dockerfile 配置Nginx + PHP + Redis环境 | 云游云记创建目录dockerfile,包含php,nginx,redis对应的dockerfile文件,mysql是直接安装在电脑上。&&&Nginx:DockerfileFROMnginx:latest#镜像信息LABELauthors=icon-default.png?t=N7T8https://upwqy.com/details/7.html

注意PHP这里,如果在运行结果后 php-fpm没有运行起来,提示php-fpm找不到,那就需要提前执行 docker pull php:7.4-fpm  不知道什么毛病,刚好本人遇到了这样的问题,还白白浪费了一下午的时间。 

到了这里,如果上面都运行没有问题,那就需要设置nginx配置了。注意上面挂载的宿主机上nginx的配置目录 /Users/wang/Documents/docker/nginx/conf

在该目录下面,创建default.conf 和 proxy-php 文件,

注意文件中的目录是在docker中的目录,而不是宿主机上的目录,在宿主机上增加配置会自动同步到docker中,因为上面进行了目录挂载,会自动同步。

default.conf内容如下:

  1. server {
  2. listen 80;
  3. server_name b2c-api.wangqy.cn;
  4. root /var/wwwroots/yunyou/mall/b2c/b2c-api/public;
  5. include /etc/nginx/conf.d/proxy-php;
  6. }
  7. server {
  8. listen 80;
  9. server_name xinchenghui.wangqy.cn;
  10. root /var/wwwroots/ruijie/xinchenghui/xinchenghui-api/public;
  11. include /etc/nginx/conf.d/proxy-php;
  12. }

proxy-php 内容如下:

  1. location ~* (runtime|application)/{
  2. return 403;
  3. }
  4. location ~ \.php(.*)$ {
  5. fastcgi_pass 172.17.0.4:9000;
  6. fastcgi_index index.php;
  7. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  8. include fastcgi_params;
  9. }
  10. location / {
  11. index index.html index.htm index.php;
  12. if (!-e $request_filename) {
  13. rewrite ^(.*)$ /index.php?s=/$1 last;
  14. break;
  15. }
  16. }

然后在/etc/hosts 文件中 增加 虚拟域名配置 

127.0.0.1 b2c-api.wangqy.cn

另外在代码中连接数据库 和redis 不能直接使用127.0.0.1 直接连接 而应该使用 host.docker.internal 进行连接

注意在proxy-php文件中的   fastcgi_pass 172.17.0.4:9000;     其中的172.17.0.4 是docker中的php的桥接网络IP地址,可以在phpstorm工具服务界面中查看,也可以通过命令 docker inspect 容器名 查看

 查看指定容器的网络信息, php74 是容器名

docker inspect php74

  1. [
  2. {
  3. "Id": "105034676d065f4158e106c5c11e49fddfac643230acb536d06bde44424fa75d",
  4. "Created": "2024-05-14T05:15:24.827276542Z",
  5. "Path": "docker-php-entrypoint",
  6. "Args": [
  7. "php-fpm"
  8. ],
  9. "State": {
  10. "Status": "running",
  11. "Running": true,
  12. "Paused": false,
  13. "Restarting": false,
  14. "OOMKilled": false,
  15. "Dead": false,
  16. "Pid": 94294,
  17. "ExitCode": 0,
  18. "Error": "",
  19. "StartedAt": "2024-05-14T05:15:25.132710792Z",
  20. "FinishedAt": "0001-01-01T00:00:00Z"
  21. },
  22. "Image": "sha256:9b213ca7c7ce743d98d7f0c87e9489dc1768ba86068aebd2bc07ffc23bb65a1c",
  23. "ResolvConfPath": "/var/lib/docker/containers/105034676d065f4158e106c5c11e49fddfac643230acb536d06bde44424fa75d/resolv.conf",
  24. "HostnamePath": "/var/lib/docker/containers/105034676d065f4158e106c5c11e49fddfac643230acb536d06bde44424fa75d/hostname",
  25. "HostsPath": "/var/lib/docker/containers/105034676d065f4158e106c5c11e49fddfac643230acb536d06bde44424fa75d/hosts",
  26. "LogPath": "/var/lib/docker/containers/105034676d065f4158e106c5c11e49fddfac643230acb536d06bde44424fa75d/105034676d065f4158e106c5c11e49fddfac643230acb536d06bde44424fa75d-json.log",
  27. "Name": "/php74",
  28. "RestartCount": 0,
  29. "Driver": "overlay2",
  30. "Platform": "linux",
  31. "MountLabel": "",
  32. "ProcessLabel": "",
  33. "AppArmorProfile": "",
  34. "ExecIDs": null,
  35. "HostConfig": {
  36. "Binds": [
  37. "/Users/wang/Documents/docker/www:/var/wwwroots:rw",
  38. "/Users/wang/Documents/docker/php74/conf:/usr/local/etc/php74/conf.d:rw"
  39. ],
  40. "ContainerIDFile": "",
  41. "LogConfig": {
  42. "Type": "json-file",
  43. "Config": {}
  44. },
  45. "NetworkMode": "default",
  46. "PortBindings": {
  47. "9000/tcp": [
  48. {
  49. "HostIp": "0.0.0.0",
  50. "HostPort": "9000"
  51. }
  52. ]
  53. },
  54. "RestartPolicy": {
  55. "Name": "always",
  56. "MaximumRetryCount": 0
  57. },
  58. "AutoRemove": false,
  59. "VolumeDriver": "",
  60. "VolumesFrom": null,
  61. "CapAdd": null,
  62. "CapDrop": null,
  63. "CgroupnsMode": "private",
  64. "Dns": null,
  65. "DnsOptions": null,
  66. "DnsSearch": null,
  67. "ExtraHosts": null,
  68. "GroupAdd": null,
  69. "IpcMode": "private",
  70. "Cgroup": "",
  71. "Links": null,
  72. "OomScoreAdj": 0,
  73. "PidMode": "",
  74. "Privileged": true,
  75. "PublishAllPorts": false,
  76. "ReadonlyRootfs": false,
  77. "SecurityOpt": [
  78. "label=disable"
  79. ],
  80. "UTSMode": "",
  81. "UsernsMode": "",
  82. "ShmSize": 67108864,
  83. "Runtime": "runc",
  84. "ConsoleSize": [
  85. 0,
  86. 0
  87. ],
  88. "Isolation": "",
  89. "CpuShares": 0,
  90. "Memory": 0,
  91. "NanoCpus": 0,
  92. "CgroupParent": "",
  93. "BlkioWeight": 0,
  94. "BlkioWeightDevice": null,
  95. "BlkioDeviceReadBps": null,
  96. "BlkioDeviceWriteBps": null,
  97. "BlkioDeviceReadIOps": null,
  98. "BlkioDeviceWriteIOps": null,
  99. "CpuPeriod": 0,
  100. "CpuQuota": 0,
  101. "CpuRealtimePeriod": 0,
  102. "CpuRealtimeRuntime": 0,
  103. "CpusetCpus": "",
  104. "CpusetMems": "",
  105. "Devices": null,
  106. "DeviceCgroupRules": null,
  107. "DeviceRequests": null,
  108. "KernelMemory": 0,
  109. "KernelMemoryTCP": 0,
  110. "MemoryReservation": 0,
  111. "MemorySwap": 0,
  112. "MemorySwappiness": null,
  113. "OomKillDisable": null,
  114. "PidsLimit": null,
  115. "Ulimits": null,
  116. "CpuCount": 0,
  117. "CpuPercent": 0,
  118. "IOMaximumIOps": 0,
  119. "IOMaximumBandwidth": 0,
  120. "MaskedPaths": null,
  121. "ReadonlyPaths": null
  122. },
  123. "GraphDriver": {
  124. "Data": {
  125. "LowerDir": "/var/lib/docker/overlay2/2e6021b6700b5027f674ebd09a1edba03e8eb1206841345fff352dce7e2d8561-init/diff:/var/lib/docker/overlay2/yc4ug25aqz1cxco8ljjk2howv/diff:/var/lib/docker/overlay2/5ssuvx29v9reyu58lmmnv9d19/diff:/var/lib/docker/overlay2/0u6klhv7t5mgd6qbl4pi1i1t4/diff:/var/lib/docker/overlay2/e2y9yoonuksy9o4wzzcnoidr6/diff:/var/lib/docker/overlay2/vkqhte8cl4thhyrzlyrlzgmdw/diff:/var/lib/docker/overlay2/xdhfg9zowkjxkjhoze0cr8s63/diff:/var/lib/docker/overlay2/bfn5tkz66cgboswqmaf711sqj/diff:/var/lib/docker/overlay2/l28kf5u8v06mwsi32rtb7vp3k/diff:/var/lib/docker/overlay2/iu71k88gwuwwg12s2rmphc6uc/diff:/var/lib/docker/overlay2/uxnkhprr9yerpqftlkag751ph/diff:/var/lib/docker/overlay2/yigemfya0uanj35fibkqag7wb/diff:/var/lib/docker/overlay2/s59silndov17qc3qy5e1tvd7t/diff:/var/lib/docker/overlay2/bcdoudyi68o51gyeyw7i441dx/diff:/var/lib/docker/overlay2/c18k02nievkwwlcloaps55ifl/diff:/var/lib/docker/overlay2/w70okq84twvkhgdsx6slfidzm/diff:/var/lib/docker/overlay2/kaezxrhfapuigi9zhrmqmaew8/diff:/var/lib/docker/overlay2/vn8npz62txyaolhxg4yk4zkak/diff:/var/lib/docker/overlay2/v3v0m6jgyinwgh8imnu7b2hfn/diff:/var/lib/docker/overlay2/mqclgluku95ekqx43fhi1vnul/diff:/var/lib/docker/overlay2/69xykaz6meum0tstmd6qoaff7/diff:/var/lib/docker/overlay2/lliq7mxzq2444wrkdh20ta29p/diff:/var/lib/docker/overlay2/bpuhj7itnqmw67muxtnbocvfh/diff:/var/lib/docker/overlay2/9roa7lv5dm7fsbmaui5yu12yr/diff:/var/lib/docker/overlay2/sze10ara19f8iyiy8jvjgqys4/diff:/var/lib/docker/overlay2/dtuk80o444nup960egqmdcprh/diff:/var/lib/docker/overlay2/4k788ok9nphm5zq2x3gcaexyr/diff:/var/lib/docker/overlay2/3ef3g1yw0agni013v8ma8isdn/diff:/var/lib/docker/overlay2/is55uyj5lyq4tnu10jnrvn395/diff:/var/lib/docker/overlay2/s59idj0mtg2awe6rk8fkuigh0/diff:/var/lib/docker/overlay2/tesrvbmlo78yv5r5lnn3ofzqh/diff:/var/lib/docker/overlay2/hznt0bbxm5cnvc7geagae8un2/diff:/var/lib/docker/overlay2/tfwujletzwm5wsplrmh8gp9bb/diff:/var/lib/docker/overlay2/47gy563ypjqrio2ljgrd67195/diff:/var/lib/docker/overlay2/s2wj9voctpitxdb2zmkdhzxom/diff:/var/lib/docker/overlay2/397bo6iyybu183rzki0mqr9kb/diff:/var/lib/docker/overlay2/naqvgbfi4mbpg4flqp0wrnwao/diff:/var/lib/docker/overlay2/3cp5kfp6sasgfn1lkegb1qxm4/diff:/var/lib/docker/overlay2/xq7jgcumen1dfslpu8ctbu0u0/diff:/var/lib/docker/overlay2/g8sie7kwn4gz454qctc8mh1k3/diff:/var/lib/docker/overlay2/i2rxot0aitr5273fx73xz5rk1/diff:/var/lib/docker/overlay2/4ms8ga29qmo7ogpjkh6nmq6as/diff:/var/lib/docker/overlay2/ovh2ztqbvjs55gw927aer9f27/diff:/var/lib/docker/overlay2/pna9448azp8aw1kj5nlexljx9/diff:/var/lib/docker/overlay2/x17pdbze0q6n5t8ssgr3l1r42/diff:/var/lib/docker/overlay2/wpm8o60q2d0q0b44f4wzzr5h6/diff:/var/lib/docker/overlay2/kc3ipasux65lktpwvincmg9t2/diff:/var/lib/docker/overlay2/boqxf8c7lavolm9zn02f6ng4c/diff:/var/lib/docker/overlay2/pdrlroke92uldelntbbtr652j/diff:/var/lib/docker/overlay2/agt2lix71qe2awu5ccllyam6a/diff:/var/lib/docker/overlay2/xu3qlcbhe2xuru01twum1jm2l/diff:/var/lib/docker/overlay2/osa89hlr5d4ppt68e7m2ypi9k/diff:/var/lib/docker/overlay2/v6u7hifglxaog81ubf9arc1y7/diff:/var/lib/docker/overlay2/gj2s2ljg0lf53q4mycpdpcbp9/diff:/var/lib/docker/overlay2/orwdfn8iovuwblib4s2iyef44/diff:/var/lib/docker/overlay2/jptvz5dwrnv87f959o929q7ex/diff:/var/lib/docker/overlay2/hmydv1v4k9odt3zhu4xyne57v/diff:/var/lib/docker/overlay2/rt2liuuzjybuhrl028zdfn7ax/diff:/var/lib/docker/overlay2/njpmvcijjchwoivr4au5d1nf5/diff:/var/lib/docker/overlay2/vpmkajrcuzhsk5yq36xqu7c24/diff:/var/lib/docker/overlay2/q6nz5du3f7hei14il82pem9i7/diff:/var/lib/docker/overlay2/x34w2htjom6w0xd68hsfhaniw/diff:/var/lib/docker/overlay2/j09r89jnwwakdti57znyzbxdc/diff:/var/lib/docker/overlay2/iq1hhuz484luccirszrv14lgz/diff:/var/lib/docker/overlay2/uxkr7l3067d3nayy3cfjzzwgc/diff:/var/lib/docker/overlay2/008df4prlx2wmfn5w3sujxefe/diff:/var/lib/docker/overlay2/c5quspq2q3mn8s3ppyc96wa79/diff:/var/lib/docker/overlay2/ahrhnwwe8i9res3qekq8gsglj/diff:/var/lib/docker/overlay2/j9nmzzdyfyx0537rd9ljr2gvp/diff:/var/lib/docker/overlay2/t4xzm5jnhhfyyodim1b4o2bt4/diff:/var/lib/docker/overlay2/ndma4875lf94v9ej3qhdu6ym6/diff:/var/lib/docker/overlay2/xgf3vhth592fw9xkfxrzkiab2/diff:/var/lib/docker/overlay2/rt5t9szt01ir4mhtumo2aq48l/diff:/var/lib/docker/overlay2/lnyvfvsnss00vyd57zevkz1nj/diff:/var/lib/docker/overlay2/xxcy3fh5y207qv2pq4gr0h2rg/diff:/var/lib/docker/overlay2/cuqvkr2qogc455vsqkqsrti0z/diff:/var/lib/docker/overlay2/wbco5ie9p31t65thcyxtqfksf/diff:/var/lib/docker/overlay2/y4t68332y0hrqxyo6c549fdhj/diff:/var/lib/docker/overlay2/qcjlq8pxoc6bjy72md4cml48c/diff:/var/lib/docker/overlay2/pgzggv5aell2ncduwltj9lslz/diff:/var/lib/docker/overlay2/a4pd7vwkxl5q6muukvc7z0y2j/diff:/var/lib/docker/overlay2/33baffrld39tff7oy2dsoctf5/diff:/var/lib/docker/overlay2/8mamvb79qov04aqtwl1r65enf/diff:/var/lib/docker/overlay2/iqf3l6n20g1vngs6ub9m8ynwd/diff:/var/lib/docker/overlay2/k0kx6ytyk9usogyjm2ovetfxd/diff:/var/lib/docker/overlay2/999460e93cacece01a40a39dedbad1f5d08597edee83591134bcd842dcc2ef58/diff:/var/lib/docker/overlay2/029ac59704e8abb37fcc3a8ddde791e81b482034e735d6a705b12547c66a31c9/diff:/var/lib/docker/overlay2/47f657978550f7190ba3cace33d5b71a21e6888c248f0dbc24fd4a7054433ffd/diff:/var/lib/docker/overlay2/56a0b058d8bf05ff75394d583f77f6bfefe5ad1d80ca2e09e2d60643c7d18237/diff:/var/lib/docker/overlay2/aaf80e5c6396a849f0b5fabfb4b7d240b14e7ed573fa5961ebb4fbddc632e73e/diff:/var/lib/docker/overlay2/6c9d0957e52ab481a42eaa677d1e955032e325628ce8f1a1ce85ed8d7123cc60/diff:/var/lib/docker/overlay2/9b007b91fcb0652dd96339f4261062537309ad69430ed2637d058d67ca146171/diff:/var/lib/docker/overlay2/b3e201c1ac95f87acf3e2a01b176c3e1c10bbde657ba1d6b85a050050b2bcbc8/diff:/var/lib/docker/overlay2/f032b7f0c6393b15fe444e4a181881a7cea296a0360590e0e644072f731f588f/diff:/var/lib/docker/overlay2/80aeaf97528f8be33c00101a22b2bf8b6d996559f00d05fa5ab8db26c2be5098/diff",
  126. "MergedDir": "/var/lib/docker/overlay2/2e6021b6700b5027f674ebd09a1edba03e8eb1206841345fff352dce7e2d8561/merged",
  127. "UpperDir": "/var/lib/docker/overlay2/2e6021b6700b5027f674ebd09a1edba03e8eb1206841345fff352dce7e2d8561/diff",
  128. "WorkDir": "/var/lib/docker/overlay2/2e6021b6700b5027f674ebd09a1edba03e8eb1206841345fff352dce7e2d8561/work"
  129. },
  130. "Name": "overlay2"
  131. },
  132. "Mounts": [
  133. {
  134. "Type": "bind",
  135. "Source": "/Users/wang/Documents/docker/www",
  136. "Destination": "/var/wwwroots",
  137. "Mode": "rw",
  138. "RW": true,
  139. "Propagation": "rprivate"
  140. },
  141. {
  142. "Type": "bind",
  143. "Source": "/Users/wang/Documents/docker/php74/conf",
  144. "Destination": "/usr/local/etc/php74/conf.d",
  145. "Mode": "rw",
  146. "RW": true,
  147. "Propagation": "rprivate"
  148. }
  149. ],
  150. "Config": {
  151. "Hostname": "105034676d06",
  152. "Domainname": "",
  153. "User": "",
  154. "AttachStdin": false,
  155. "AttachStdout": false,
  156. "AttachStderr": false,
  157. "ExposedPorts": {
  158. "9000/tcp": {}
  159. },
  160. "Tty": true,
  161. "OpenStdin": false,
  162. "StdinOnce": false,
  163. "Env": [
  164. "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
  165. "PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c",
  166. "PHP_INI_DIR=/usr/local/etc/php",
  167. "PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
  168. "PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
  169. "PHP_LDFLAGS=-Wl,-O1 -pie",
  170. "GPG_KEYS=42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312",
  171. "PHP_VERSION=7.4.33",
  172. "PHP_URL=https://www.php.net/distributions/php-7.4.33.tar.xz",
  173. "PHP_ASC_URL=https://www.php.net/distributions/php-7.4.33.tar.xz.asc",
  174. "PHP_SHA256=924846abf93bc613815c55dd3f5809377813ac62a9ec4eb3778675b82a27b927",
  175. "TZ== Asia/Shanghai"
  176. ],
  177. "Cmd": [
  178. "php-fpm"
  179. ],
  180. "Image": "9b213ca7c7ce",
  181. "Volumes": null,
  182. "WorkingDir": "/var/wwwroots",
  183. "Entrypoint": [
  184. "docker-php-entrypoint"
  185. ],
  186. "OnBuild": null,
  187. "Labels": {
  188. "authors": "= wang"
  189. },
  190. "StopSignal": "SIGQUIT"
  191. },
  192. "NetworkSettings": {
  193. "Bridge": "",
  194. "SandboxID": "02e2fd40cc1ac1e6d30f298e021803315dc1f75d34d7eadb80f2c884ebe0679b",
  195. "HairpinMode": false,
  196. "LinkLocalIPv6Address": "",
  197. "LinkLocalIPv6PrefixLen": 0,
  198. "Ports": {
  199. "9000/tcp": [
  200. {
  201. "HostIp": "0.0.0.0",
  202. "HostPort": "9000"
  203. }
  204. ]
  205. },
  206. "SandboxKey": "/var/run/docker/netns/02e2fd40cc1a",
  207. "SecondaryIPAddresses": null,
  208. "SecondaryIPv6Addresses": null,
  209. "EndpointID": "0a60a4bf108d37a3b2560fef982ded1688b88269153b5b8bd0cfaa0e44850fa3",
  210. "Gateway": "172.17.0.1",
  211. "GlobalIPv6Address": "",
  212. "GlobalIPv6PrefixLen": 0,
  213. "IPAddress": "172.17.0.4",
  214. "IPPrefixLen": 16,
  215. "IPv6Gateway": "",
  216. "MacAddress": "02:42:ac:11:00:04",
  217. "Networks": {
  218. "bridge": {
  219. "IPAMConfig": null,
  220. "Links": null,
  221. "Aliases": null,
  222. "NetworkID": "d57fe86e0e638fdd3f5af6016c2cd4829764c82c4654b174cfbb08a94738863b",
  223. "EndpointID": "0a60a4bf108d37a3b2560fef982ded1688b88269153b5b8bd0cfaa0e44850fa3",
  224. "Gateway": "172.17.0.1",
  225. "IPAddress": "172.17.0.4",
  226. "IPPrefixLen": 16,
  227. "IPv6Gateway": "",
  228. "GlobalIPv6Address": "",
  229. "GlobalIPv6PrefixLen": 0,
  230. "MacAddress": "02:42:ac:11:00:04",
  231. "DriverOpts": null
  232. }
  233. }
  234. }
  235. }
  236. ]

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小桥流水78/article/detail/745501
推荐阅读
相关标签
  

闽ICP备14008679号