-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcheats.json
543 lines (543 loc) · 11.5 KB
/
cheats.json
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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
[
{
"desc": "Create and run containers in the foreground",
"cat": "Compose",
"keywords": [
"start containers",
"run containers"
],
"shell": [
"docker compose up"
]
},
{
"desc": "Create and run containers in the background",
"cat": "Compose",
"keywords": [
"start containers",
"run containers"
],
"shell": [
"docker compose up -d"
]
},
{
"desc": "List running containers",
"cat": "Compose",
"keywords": [
"list containers",
"show containers"
],
"shell": [
"docker compose ps"
]
},
{
"desc": "List all containers",
"cat": "Compose",
"keywords": [
"list containers",
"show containers"
],
"shell": [
"docker compose ps --all",
"docker compose ps -a"
]
},
{
"desc": "Stop containers",
"cat": "Compose",
"keywords": [
"stop containers"
],
"shell": [
"docker compose stop"
]
},
{
"desc": "Stop and remove containers, networks created by up",
"cat": "Compose",
"keywords": [
"stop containers",
"remove containers",
"delete containers"
],
"shell": [
"docker compose down"
]
},
{
"desc": "Pull images defined in a Compose file",
"cat": "Compose",
"keywords": [],
"shell": [
"docker compose pull"
]
},
{
"desc": "Create a container using Docker Compose",
"cat": "Compose",
"keywords": [],
"shell": [
"docker compose create"
]
},
{
"desc": "Build and start containers using Docker Compose",
"cat": "Compose",
"keywords": [],
"shell": [
"docker compose up --build",
"docker compose up -d --build"
]
},
{
"desc": "Scale services defined in a Compose file",
"cat": "Compose",
"keywords": [],
"shell": [
"docker compose up -d --scale service_name=num"
]
},
{
"desc": "View the logs of services defined in a Compose file",
"cat": "Compose",
"keywords": [],
"shell": [
"docker compose logs",
"docker compose logs service_name"
]
},
{
"desc": "Execute a command in a running container defined in a Compose file",
"cat": "Compose",
"keywords": [],
"shell": [
"docker compose exec service_name command"
]
},
{
"desc": "Run a one-off command in a service container defined in a Compose file",
"cat": "Compose",
"keywords": [],
"shell": [
"docker compose run service_name command"
]
},
{
"desc": "Remove stopped containers created by up",
"cat": "Compose",
"keywords": [],
"shell": [
"docker compose rm"
]
},
{
"desc": "Build or rebuild services",
"cat": "Compose",
"keywords": [],
"shell": [
"docker compose build",
"docker compose build service_name"
]
},
{
"desc": "List running containers",
"cat": "Container",
"keywords": [
"list containers",
"show containers"
],
"shell": [
"docker ps",
"docker container list",
"docker container ls"
]
},
{
"desc": "List all containers",
"cat": "Container",
"keywords": [],
"shell": [
"docker ps --all",
"docker ps -a",
"docker container list --all",
"docker container ls --all"
]
},
{
"desc": "Run a container from <i>my-image:1.0</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker run my-image:1.0",
"docker container run my-image:1.0"
]
},
{
"desc": "Run a container from <i>my-image:1.0</i> with the name <i>www</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker run --name www my-image:1.0"
]
},
{
"desc": "Run a container from <i>my-image:1.0</i> exposing internal port <i>3000</i> to external port <i>80</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker run --name www -p 80:3000 my-image:1.0"
]
},
{
"desc": "Stop a container by the name <i>www</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker stop www",
"docker container stop www"
]
},
{
"desc": "Stop containers by the name <i>www1</i> <i>www2</i> ...",
"cat": "Container",
"keywords": [],
"shell": [
"docker stop www1 www2",
"docker container stop www1 www2"
]
},
{
"desc": "Stop all the containers that match a keyword <i>example</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker stop $(docker ps -a | grep \"example\" | awk '{print $1}')"
]
},
{
"desc": "Kill a container by the name <i>www</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker kill www",
"docker container kill www"
]
},
{
"desc": "Kill containers by the name <i>www1</i> <i>www2</i> ...",
"cat": "Container",
"keywords": [],
"shell": [
"docker kill www1 www2",
"docker container kill www1 www2"
]
},
{
"desc": "Remove containers by the name <i>www1</i> <i>www2</i> ...",
"cat": "Container",
"keywords": [],
"shell": [
"docker rm www1 www2",
"docker container rm www1 www2"
]
},
{
"desc": "Remove all the containers that match a keyword <i>example</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker rm $(docker ps -a | grep \"example\" | awk '{print $1}')"
]
},
{
"desc": "Runs <i>id</i> in <i>www</i> container",
"cat": "Container",
"keywords": [],
"shell": [
"docker exec www id",
"docker container exec www id"
]
},
{
"desc": "Run an interactive bash shell on the container",
"cat": "Container",
"keywords": [],
"shell": [
"docker exec -it ubuntu bash",
"docker container exec -it ubuntu bash"
]
},
{
"desc": "Run a container in the background from <i>my-image:1.0</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker run -d my-image:1.0",
"docker container run -d my-image:1.0"
]
},
{
"desc": "Attach to a running container named <i>www</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker attach www",
"docker container attach www"
]
},
{
"desc": "Inspect a container named <i>www</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker inspect www",
"docker container inspect www"
]
},
{
"desc": "List logs of a container named <i>www</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker logs www",
"docker container logs www"
]
},
{
"desc": "Start a stopped container named <i>www</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker start www",
"docker container start www"
]
},
{
"desc": "Restart a running container named <i>www</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker restart www",
"docker container restart www"
]
},
{
"desc": "Pause a running container named <i>www</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker pause www",
"docker container pause www"
]
},
{
"desc": "Unpause a paused container named <i>www</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker unpause www",
"docker container unpause www"
]
},
{
"desc": "Rename a container named <i>www</i> to <i>web</i>",
"cat": "Container",
"keywords": [],
"shell": [
"docker rename www web",
"docker container rename www web"
]
},
{
"desc": "Build a image with the name <i>my-image</i> and tag <i>1.0</i>",
"cat": "Image",
"keywords": [
"create image"
],
"shell": [
"docker build -t my-image:1.0 ."
]
},
{
"desc": "List local images",
"cat": "Image",
"keywords": [
"list images",
"show images"
],
"shell": [
"docker image ls"
]
},
{
"desc": "Delete local image by the name:tag <i>my-image:1.0</i>",
"cat": "Image",
"keywords": [
"delete image",
"remove image"
],
"shell": [
"docker image rm my-image:1.0"
]
},
{
"desc": "Build an image in the current directory with the name <i>my-image</i>",
"cat": "Image",
"keywords": [
"create image"
],
"shell": [
"docker build -t my-image ."
]
},
{
"desc": "Pull image <i>example</i> from a registry",
"cat": "Image",
"keywords": [],
"shell": [
"docker pull example",
"docker image pull example"
]
},
{
"desc": "Push image <i>my-image</i> to repository <i>myrepo</i> under a registry",
"cat": "Image",
"keywords": [],
"shell": [
"docker push myrepo/my-image:2.0",
"docker image push myrepo/my-image:2.0"
]
},
{
"desc": "List networks",
"cat": "Network",
"keywords": [
"list networks",
"show networks"
],
"shell": [
"docker network ls"
]
},
{
"desc": "Create a network with the name <i>my-network</i>",
"cat": "Network",
"keywords": [],
"shell": [
"docker network create my-network"
]
},
{
"desc": "Remove a network with the name <i>my-network</i>",
"cat": "Network",
"keywords": [],
"shell": [
"docker network rm my-network"
]
},
{
"desc": "Inspect a network with the name <i>my-network</i>",
"cat": "Network",
"keywords": [],
"shell": [
"docker network inspect my-network"
]
},
{
"desc": "Remove all unused containers, networks, images (both dangling and unreferenced)",
"cat": "System",
"keywords": [
"clean containers",
"remove containers",
"storage spaces",
"cleanup",
"delete"
],
"shell": [
"docker system prune"
]
},
{
"desc": "Remove all unused containers, networks, images (both dangling and unreferenced), and volumes.",
"cat": "System",
"keywords": [
"clean containers",
"remove containers",
"storage spaces",
"cleanup",
"delete"
],
"shell": [
"docker system prune --volumes"
]
},
{
"desc": "Remove all unused containers, networks, all unused images, and volumes.",
"cat": "System",
"keywords": [
"clean containers",
"remove containers",
"storage spaces",
"cleanup",
"delete"
],
"shell": [
"docker system prune --all --volumes"
]
},
{
"desc": "List volumes",
"cat": "Volume",
"keywords": [
"list volumes",
"show volumes"
],
"shell": [
"docker volume ls"
]
},
{
"desc": "Create a volume",
"cat": "Volume",
"keywords": [
"volume creation"
],
"shell": [
"docker volume create hello"
]
},
{
"desc": "Remove all unused local volumes",
"cat": "Volume",
"keywords": [
"Remove volumes"
],
"shell": [
"docker volume prune"
]
},
{
"desc": "Backup <i>my_volume</i> to <i>my_backup.tar</i>",
"cat": "Volume",
"keywords": [
"volume backup",
"data backup"
],
"shell": [
"docker run --rm --volume my_volume:/mount_bkp --volume $(pwd):/backup ubuntu tar cvf /backup/my_backup.tar /mount_bkp"
]
},
{
"desc": "Restore <i>my_backup.tar</i> to <i>my_volume</i>",
"cat": "Volume",
"keywords": [
"volume restore",
"data restore"
],
"shell": [
"docker run --rm --volume my_volume:/mount_bkp --volume $(pwd):/backup ubuntu tar xvf /backup/my_backup.tar -C /mount_bkp --strip 1"
]
}
]