docker inspect 容器名称

    1. [root@iZbp1bm7y86rsab1sz0ihcZ ~]# docker inspect bfb1525a4745
    2. [
    3. {
    4. "Id": "bfb1525a474567596c1cea3a808bbf129a973e9f32388937126052c0d4eb1f90",
    5. "Created": "2022-03-22T08:53:51.770899061Z",
    6. "Path": "/docker-entrypoint.sh",
    7. "Args": [
    8. "nginx",
    9. "-g",
    10. "daemon off;"
    11. ],
    12. "State": {
    13. "Status": "running",
    14. "Running": true,
    15. "Paused": false,
    16. "Restarting": false,
    17. "OOMKilled": false,
    18. "Dead": false,
    19. "Pid": 8047,
    20. "ExitCode": 0,
    21. "Error": "",
    22. "StartedAt": "2022-03-22T08:53:52.12913265Z",
    23. "FinishedAt": "0001-01-01T00:00:00Z"
    24. },
    25. "Image": "sha256:f2f70adc5d89aa922836e9cc6801980a12a7ff9012446cc6edf52ef8798a67bd",
    26. "ResolvConfPath": "/var/lib/docker/containers/bfb1525a474567596c1cea3a808bbf129a973e9f32388937126052c0d4eb1f90/resolv.conf",
    27. "HostnamePath": "/var/lib/docker/containers/bfb1525a474567596c1cea3a808bbf129a973e9f32388937126052c0d4eb1f90/hostname",
    28. "HostsPath": "/var/lib/docker/containers/bfb1525a474567596c1cea3a808bbf129a973e9f32388937126052c0d4eb1f90/hosts",
    29. "LogPath": "/var/lib/docker/containers/bfb1525a474567596c1cea3a808bbf129a973e9f32388937126052c0d4eb1f90/bfb1525a474567596c1cea3a808bbf129a973e9f32388937126052c0d4eb1f90-json.log",
    30. "Name": "/nginx02",
    31. "RestartCount": 0,
    32. "Driver": "overlay2",
    33. "Platform": "linux",
    34. "MountLabel": "",
    35. "ProcessLabel": "",
    36. "AppArmorProfile": "",
    37. "ExecIDs": null,
    38. "HostConfig": {
    39. "Binds": null,
    40. "ContainerIDFile": "",
    41. "LogConfig": {
    42. "Type": "json-file",
    43. "Config": {}
    44. },
    45. "NetworkMode": "default",
    46. "PortBindings": {
    47. "80/tcp": [
    48. {
    49. "HostIp": "",
    50. "HostPort": "8888"
    51. }
    52. ]
    53. },
    54. "RestartPolicy": {
    55. "Name": "no",
    56. "MaximumRetryCount": 0
    57. },
    58. "AutoRemove": false,
    59. "VolumeDriver": "",
    60. "VolumesFrom": [
    61. "63b9283aa1fb"
    62. ],
    63. "CapAdd": null,
    64. "CapDrop": null,
    65. "CgroupnsMode": "host",
    66. "Dns": [],
    67. "DnsOptions": [],
    68. "DnsSearch": [],
    69. "ExtraHosts": null,
    70. "GroupAdd": null,
    71. "IpcMode": "private",
    72. "Cgroup": "",
    73. "Links": null,
    74. "OomScoreAdj": 0,
    75. "PidMode": "",
    76. "Privileged": false,
    77. "PublishAllPorts": false,
    78. "ReadonlyRootfs": false,
    79. "SecurityOpt": null,
    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": [],
    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": [],
    106. "DeviceCgroupRules": null,
    107. "DeviceRequests": null,
    108. "KernelMemory": 0,
    109. "KernelMemoryTCP": 0,
    110. "MemoryReservation": 0,
    111. "MemorySwap": 0,
    112. "MemorySwappiness": null,
    113. "OomKillDisable": false,
    114. "PidsLimit": null,
    115. "Ulimits": null,
    116. "CpuCount": 0,
    117. "CpuPercent": 0,
    118. "IOMaximumIOps": 0,
    119. "IOMaximumBandwidth": 0,
    120. "MaskedPaths": [
    121. "/proc/asound",
    122. "/proc/acpi",
    123. "/proc/kcore",
    124. "/proc/keys",
    125. "/proc/latency_stats",
    126. "/proc/timer_list",
    127. "/proc/timer_stats",
    128. "/proc/sched_debug",
    129. "/proc/scsi",
    130. "/sys/firmware"
    131. ],
    132. "ReadonlyPaths": [
    133. "/proc/bus",
    134. "/proc/fs",
    135. "/proc/irq",
    136. "/proc/sys",
    137. "/proc/sysrq-trigger"
    138. ]
    139. },
    140. "GraphDriver": {
    141. "Data": {
    142. "LowerDir": "/var/lib/docker/overlay2/44a9020a68bb52851d431bb4384ee9b7eba09a08cacac4c2ddbd8221bcb6c951-init/diff:/var/lib/docker/overlay2/e6910d719d305797201924b9451d6d69bc0567c9de12d13eed6c3f388c7e8c77/diff:/var/lib/docker/overlay2/c55c7fa69cb66d8d56ebee0f7f9a0d4eb18564707cdeabea42452895ab98edd1/diff:/var/lib/docker/overlay2/cc926d0a3b411369f474a0c5fa1e1807973f4212bf751ba474040a8d615d736b/diff:/var/lib/docker/overlay2/3125f60a776c77c84ce49e39d423dc832a7ed35c581e4a79b5856a0968cedd60/diff:/var/lib/docker/overlay2/b3e9b9442ab22368bc7f2c1fd53079923a42a419f6bfa8309be1c6f7fda4a954/diff:/var/lib/docker/overlay2/5d6ee834cd7604aa210d38adba76c1df023bc84bdaabf78c1e25249e14cf8991/diff",
    143. "MergedDir": "/var/lib/docker/overlay2/44a9020a68bb52851d431bb4384ee9b7eba09a08cacac4c2ddbd8221bcb6c951/merged",
    144. "UpperDir": "/var/lib/docker/overlay2/44a9020a68bb52851d431bb4384ee9b7eba09a08cacac4c2ddbd8221bcb6c951/diff",
    145. "WorkDir": "/var/lib/docker/overlay2/44a9020a68bb52851d431bb4384ee9b7eba09a08cacac4c2ddbd8221bcb6c951/work"
    146. },
    147. "Name": "overlay2"
    148. },
    149. "Mounts": [
    150. {
    151. "Type": "bind",
    152. "Source": "/data",
    153. "Destination": "/usr/share/nginx/html",
    154. "Mode": "",
    155. "RW": true,
    156. "Propagation": "rprivate"
    157. }
    158. ],
    159. "Config": {
    160. "Hostname": "bfb1525a4745",
    161. "Domainname": "",
    162. "User": "",
    163. "AttachStdin": false,
    164. "AttachStdout": false,
    165. "AttachStderr": false,
    166. "ExposedPorts": {
    167. "80/tcp": {}
    168. },
    169. "Tty": false,
    170. "OpenStdin": true,
    171. "StdinOnce": false,
    172. "Env": [
    173. "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
    174. "NGINX_VERSION=1.21.6",
    175. "NJS_VERSION=0.7.2",
    176. "PKG_RELEASE=1~bullseye"
    177. ],
    178. "Cmd": [
    179. "nginx",
    180. "-g",
    181. "daemon off;"
    182. ],
    183. "Image": "nginx",
    184. "Volumes": null,
    185. "WorkingDir": "",
    186. "Entrypoint": [
    187. "/docker-entrypoint.sh"
    188. ],
    189. "OnBuild": null,
    190. "Labels": {
    191. "maintainer": "NGINX Docker Maintainers <docker-maint@nginx.com>"
    192. },
    193. "StopSignal": "SIGQUIT"
    194. },
    195. "NetworkSettings": {
    196. "Bridge": "",
    197. "SandboxID": "345a02bc777e68ea8048c656dad8cad9ffe9fb0c75d418336e8dc11556fc2d93",
    198. "HairpinMode": false,
    199. "LinkLocalIPv6Address": "",
    200. "LinkLocalIPv6PrefixLen": 0,
    201. "Ports": {
    202. "80/tcp": [
    203. {
    204. "HostIp": "0.0.0.0",
    205. "HostPort": "8888"
    206. }
    207. ]
    208. },
    209. "SandboxKey": "/var/run/docker/netns/345a02bc777e",
    210. "SecondaryIPAddresses": null,
    211. "SecondaryIPv6Addresses": null,
    212. "EndpointID": "4a07119b79b8e09134b415e7d59f6729185f0a45928a17ab1e1c025dac164064",
    213. "Gateway": "172.17.0.1",
    214. "GlobalIPv6Address": "",
    215. "GlobalIPv6PrefixLen": 0,
    216. "IPAddress": "172.17.0.3",
    217. "IPPrefixLen": 16,
    218. "IPv6Gateway": "",
    219. "MacAddress": "02:42:ac:11:00:03",
    220. "Networks": {
    221. "bridge": {
    222. "IPAMConfig": null,
    223. "Links": null,
    224. "Aliases": null,
    225. "NetworkID": "96520e5edd1ec646d8e77bfff730917a9f4ae579c109941fd224e37b59ee8e72",
    226. "EndpointID": "4a07119b79b8e09134b415e7d59f6729185f0a45928a17ab1e1c025dac164064",
    227. "Gateway": "172.17.0.1",
    228. "IPAddress": "172.17.0.3",
    229. "IPPrefixLen": 16,
    230. "IPv6Gateway": "",
    231. "GlobalIPv6Address": "",
    232. "GlobalIPv6PrefixLen": 0,
    233. "MacAddress": "02:42:ac:11:00:03",
    234. "DriverOpts": null
    235. }
    236. }
    237. }
    238. }
    239. ]
    240. [root@iZbp1bm7y86rsab1sz0ihcZ ~]#