1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
$ docker inspect b055811ce23c
[
{
"Id": "b055811ce23cf53d3b5e2cf193c0cd4a22a5befbf101bdd940662ecbe64ccc2c",
"Created": "2022-09-06T08:50:31.6648081Z",
"Path": "docker-entrypoint.sh",
"Args": [
"mysqld"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 2724,
"ExitCode": 0,
"Error": "",
"StartedAt": "2022-09-17T12:02:29.756584113Z",
"FinishedAt": "2022-09-17T12:02:27.248114859Z"
},
"Image": "sha256:ff3b5098b416cc4294d8d5c43c2f0f8251e91711347318e73cb290ffe2783bcb",
"ResolvConfPath": "/var/lib/docker/containers/b055811ce23cf53d3b5e2cf193c0cd4a22a5befbf101bdd940662ecbe64ccc2c/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/b055811ce23cf53d3b5e2cf193c0cd4a22a5befbf101bdd940662ecbe64ccc2c/hostname",
"HostsPath": "/var/lib/docker/containers/b055811ce23cf53d3b5e2cf193c0cd4a22a5befbf101bdd940662ecbe64ccc2c/hosts",
"LogPath": "/var/lib/docker/containers/b055811ce23cf53d3b5e2cf193c0cd4a22a5befbf101bdd940662ecbe64ccc2c/b055811ce23cf53d3b5e2cf193c0cd4a22a5befbf101bdd940662ecbe64ccc2c-json.log",
"Name": "/mysql8",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/Users/Downloads/Docker/mysql/config/my.cnf:/etc/mysql/my.cnf",
"/Users/Downloads/Docker/mysql/data:/usr/data",
"/Users/Downloads/Docker/mysql/log:/logs",
"/Users/Downloads/Docker/mysql/localtime:/etc/localtime"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "bridge",
"PortBindings": {
"3306/tcp": [
{
"HostIp": "",
"HostPort": "3306"
}
]
},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "private",
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": true,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": [
"label=disable"
],
"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": null,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": null,
"ReadonlyPaths": null
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/262b7fe49ceef30a815f7acd398efd160a8575276a26bd3ed5fe8d03b89c64f5-init/diff:/var/lib/docker/overlay2/f9793fa9c30e39c82416c7664ba9f1bded7164da0eedc04db5f9d34e8ae524bd/diff:/var/lib/docker/overlay2/8bd9971c98c7afafafb6af93fe793eb01881a3e28a25e166cce5037d1867f3a6/diff:/var/lib/docker/overlay2/718e2486037cff064644cfe79f7e0710364ed8b18a2813c501fc921872e154a7/diff:/var/lib/docker/overlay2/d4239c0d55a03ec8e29d9e7a4fcd7aab5f081c4a564eb341d1065f9d0df24429/diff:/var/lib/docker/overlay2/e393d409b7557dac52f8e497f8743ef9663b6037abe9a4edd8cdd66bad9de964/diff:/var/lib/docker/overlay2/1bb134141159fe08fa4dc08b7404e92b103242319663ecee72f5e4aff61c3a40/diff:/var/lib/docker/overlay2/ed42a23c02fe373db201fcc49bf0bd80ee663766ac400aa101163a42ea6ba469/diff:/var/lib/docker/overlay2/d4e972b8eae083ea8c8dc28538c2d92b2e63e4849c348e47783725cbfd42eafa/diff:/var/lib/docker/overlay2/b23c6d2cb95f018ab8ade60d15a40f9bd4eca5568cdae22b10a75b4b22bb8608/diff:/var/lib/docker/overlay2/36e999dce4bab3eee5d5a74b607ee845ebd8b95707222b9f0e57f5d40922b1ce/diff:/var/lib/docker/overlay2/b0f8ffee4114eb3d1797566ab320c34e38e71780e532cadb8d327f03c5a49593/diff",
"MergedDir": "/var/lib/docker/overlay2/262b7fe49ceef30a815f7acd398efd160a8575276a26bd3ed5fe8d03b89c64f5/merged",
"UpperDir": "/var/lib/docker/overlay2/262b7fe49ceef30a815f7acd398efd160a8575276a26bd3ed5fe8d03b89c64f5/diff",
"WorkDir": "/var/lib/docker/overlay2/262b7fe49ceef30a815f7acd398efd160a8575276a26bd3ed5fe8d03b89c64f5/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "bind",
"Source": "/Users/Downloads/Docker/mysql/localtime",
"Destination": "/etc/localtime",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/Users/Downloads/Docker/mysql/config/my.cnf",
"Destination": "/etc/mysql/my.cnf",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/Users/Downloads/Docker/mysql/log",
"Destination": "/logs",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/Users/Downloads/Docker/mysql/data",
"Destination": "/usr/data",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "volume",
"Name": "eda1141a1129e17676fc14b6cfedc975c01b8cef030d3042df9543ae0c133ba6",
"Source": "/var/lib/docker/volumes/eda1141a1129e17676fc14b6cfedc975c01b8cef030d3042df9543ae0c133ba6/_data",
"Destination": "/var/lib/mysql",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "b055811ce23c",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"3306/tcp": {},
"33060/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"MYSQL_PASSWORD=test123456",
"character-set-server=utf8",
"collation-server=utf8_general_ci",
"MYSQL_ROOT_PASSWORD=root123456",
"MYSQL_USER=mysql",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GOSU_VERSION=1.14",
"MYSQL_MAJOR=8.0",
"MYSQL_VERSION=8.0.30-1.el8",
"MYSQL_SHELL_VERSION=8.0.30-1.el8"
],
"Cmd": [
"mysqld"
],
"Image": "mysql:8.0",
"Volumes": {
"/var/lib/mysql": {}
},
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "c6b894c6e93f77d1373c596b7e0b739e9077496ae8fd0f9ac4a0e332cd9ff64b",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"3306/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "3306"
}
],
"33060/tcp": null
},
"SandboxKey": "/var/run/docker/netns/c6b894c6e93f",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "632055c898d3becb5e76e5216cd471daed266f115ab84c18dd4f64da4adbf189",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.8",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:08",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "df04e694c73a176ccca94ab55253f9ac8937658faf87c4a23a1215e98c114e28",
"EndpointID": "632055c898d3becb5e76e5216cd471daed266f115ab84c18dd4f64da4adbf189",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.8",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:08",
"DriverOpts": null
}
}
}
}
]
$
|