apuntes:docker
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
apuntes:docker [2017/09/20 12:19] – [Crear una imagen] Santiago Faci | apuntes:docker [2025/03/24 09:38] (current) – [Construir e iniciar un proyecto con docker compose] Santiago Faci | ||
---|---|---|---|
Line 131: | Line 131: | ||
Deleted: sha256: | Deleted: sha256: | ||
Deleted: sha256: | Deleted: sha256: | ||
+ | </ | ||
+ | |||
+ | También podemos hacerlo usando el nombre de la imagen: | ||
+ | |||
+ | <code bash> | ||
+ | santi@zenbook: | ||
</ | </ | ||
Line 292: | Line 298: | ||
santi@zenbook: | santi@zenbook: | ||
map[80/ | map[80/ | ||
+ | </ | ||
+ | |||
+ | ===== Docker Compose ===== | ||
+ | |||
+ | ==== Construir e iniciar un proyecto con docker compose ==== | ||
+ | |||
+ | <code yaml> | ||
+ | version: " | ||
+ | name: cities | ||
+ | services: | ||
+ | db: | ||
+ | image: mariadb: | ||
+ | container_name: | ||
+ | environment: | ||
+ | MYSQL_USER: ' | ||
+ | MYSQL_PASSWORD: | ||
+ | MYSQL_PORT: 3306, | ||
+ | MYSQL_ROOT_PASSWORD: | ||
+ | ports: | ||
+ | - " | ||
+ | volumes: | ||
+ | - ./ | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | santi@zenbook: | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | santi@zenbook: | ||
+ | </ | ||
+ | |||
+ | ==== Detener un proyecto docker compose ==== | ||
+ | |||
+ | <code bash> | ||
+ | santi@zenbook: | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | santi@zenbook: | ||
+ | </ | ||
+ | |||
+ | ==== Iniciar un proyecto docker compose ==== | ||
+ | |||
+ | <code bash> | ||
+ | santi@zenbook: | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | santi@zenbook: | ||
+ | </ | ||
+ | |||
+ | ==== Eliminar un proyecto docker compose ==== | ||
+ | |||
+ | <code bash> | ||
+ | santi@zenbook: | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | santi@zenbook: | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Configurar una red para un proyecto docker compose ==== | ||
+ | |||
+ | ===== Varios ===== | ||
+ | |||
+ | ==== Eliminar la caché ==== | ||
+ | |||
+ | Eliminará la cache del proceso de construcción de las imágenes. Asi podemos forzar que vuelva a descargar todos los ficheros y realizar todos los pasos como si fuera la primera vez. | ||
+ | |||
+ | <code bash> | ||
+ | santi@zenbook: | ||
</ | </ | ||
apuntes/docker.1505909993.txt.gz · Last modified: 2019/01/04 13:02 (external edit)