You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 01-contenedores/contenedores-ii/README.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -353,6 +353,35 @@ docker run -p 8080:8080 gcr.io/google-samples/hello-app:1.0
353
353
docker run mcr.microsoft.com/mcr/hello-world
354
354
```
355
355
356
+
## 🗄️ Crear tu propio registro Docker privado en un contenedor
357
+
358
+
Puedes levantar un registro privado de Docker en tu máquina usando la imagen oficial `registry`. Esto es útil para compartir imágenes en tu equipo o entorno local.
359
+
360
+
```bash
361
+
docker run -d -p 5000:5000 --name registry registry:2
362
+
```
363
+
364
+
Esto inicia un registro accesible en `localhost:5000`.
365
+
366
+
### 📦 Subir una imagen a tu registro privado
367
+
368
+
1. Etiqueta la imagen para tu registro local:
369
+
```bash
370
+
docker tag nginx localhost:5000/nginx
371
+
```
372
+
2. Sube la imagen:
373
+
```bash
374
+
docker push localhost:5000/nginx
375
+
```
376
+
377
+
### ⬇️ Descargar una imagen desde tu registro privado
378
+
379
+
```bash
380
+
docker pull localhost:5000/nginx
381
+
```
382
+
383
+
> 💡 **Tip:** Para entornos de producción, añade autenticación y TLS. Consulta la [documentación oficial](https://docs.docker.com/registry/) para más opciones.
384
+
356
385
## 🔍 Buscar imágenes en Docker Hub
357
386
358
387
Ya vimos en el primer día cómo buscar imágenes en Docker Hub, pero vamos a recordarlo.
0 commit comments