-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheatsheet_docker_basic.html
More file actions
155 lines (152 loc) · 4.78 KB
/
cheatsheet_docker_basic.html
File metadata and controls
155 lines (152 loc) · 4.78 KB
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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Docker Cheat Sheet - Ubuntu & Windows</title>
<style>
*, *::before, *::after {
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
font-size: 11pt;
line-height: 1.5;
color: #333333;
background-color: #f4f7f6;
margin: 0;
padding: 20px;
}
.container {
max-width: 1000px;
margin: 0 auto;
background: #ffffff;
padding: 30px;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
header {
border-bottom: 3px solid #2496ed;
padding-bottom: 15px;
margin-bottom: 30px;
}
h1 {
color: #1d2731;
font-size: 24pt;
margin: 0 0 10px 0;
}
.subtitle {
color: #666;
font-size: 12pt;
margin: 0;
}
.section-card {
display: block;
background: #fafafa;
border-left: 4px solid #2496ed;
padding: 20px;
margin-bottom: 25px;
border-radius: 0 6px 6px 0;
}
h2 {
color: #2496ed;
font-size: 14pt;
margin-top: 0;
margin-bottom: 15px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 10px;
}
th, td {
text-align: left;
padding: 10px 12px;
vertical-align: top;
border-bottom: 1px solid #eef2f5;
}
th {
background-color: #ededed;
color: #333;
font-weight: bold;
font-size: 10pt;
}
tr:nth-child(even) td {
background-color: #fdfdfd;
}
.cmd-block {
display: block;
background-color: #272822;
color: #f8f8f2;
padding: 10px;
border-radius: 5px;
font-family: monospace;
font-size: 9.5pt;
margin: 5px 0;
white-space: pre-wrap;
}
.cmd-block code {
background: none;
color: #f8f8f2;
padding: 0;
display: block;
}
.badge {
display: inline-block;
padding: 2px 6px;
font-size: 8pt;
font-weight: bold;
border-radius: 3px;
color: #fff;
margin-right: 5px;
}
.badge-ubuntu { background-color: #E95420; }
.badge-windows { background-color: #0078D4; }
.badge-both { background-color: #555555; }
.note {
background-color: #e7f3fe;
border-left: 4px solid #2196F3;
padding: 12px;
margin-top: 15px;
font-size: 10pt;
border-radius: 0 4px 4px 0;
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>Docker Cheat Sheet</h1>
<p class="subtitle">Guía rápida de comandos esenciales para Ubuntu (Linux) y Windows (PowerShell/CMD)</p>
</header>
<div class="section-card">
<h2>1. Gestión de Contenedores (Ciclo de Vida)</h2>
<table>
<thead>
<tr>
<th style="width: 35%;">Comando</th>
<th style="width: 45%;">Descripción</th>
<th style="width: 20%;">SO</th>
</tr>
</thead>
<tbody>
<tr>
<td><div class="cmd-block"><code>docker ps</code></div></td>
<td>Listar contenedores activos.</td>
<td><span class="badge badge-both">Ambos</span></td>
</tr>
<tr>
<td><div class="cmd-block"><code>docker ps -a</code></div></td>
<td>Listar todos los contenedores (activos e inactivos).</td>
<td><span class="badge badge-both">Ambos</span></td>
</tr>
<tr>
<td><div class="cmd-block"><code>docker run -d --name mi_contenedor nombre_imagen</code></div></td>
<td>Crear y arrancar un contenedor en segundo plano (detached).</td>
<td><span class="badge badge-both">Ambos</span></td>
</tr>
<tr>
<td><div class="cmd-block"><code>docker start mi_contenedor</code></div></td>
<td>Iniciar un contenedor detenido.</td>
<td><span class="badge badge