Este repositorio contiene las imágenes correspondiente al Ejercicio 2 del Módulo 2
144
docker volume create mysql-volume
docker pull mysql
docker tag 8251f0669c6e jbaricot/mysql:v1 docker tag 8251f0669c6e jbaricot/mysql:despliegue_cli
docker push jbaricot/mysql:v1 docker push jbaricot/mysql:despliegue_cli
docker run --name mysql_container_1 -d -v mysql-volume:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=asd123 -e MYSQL_DATABASE=my_db -e MYSQL_USER=jbaricot -e MYSQL_PASSWORD=asdf1234 jbaricot/mysql:despliegue_cli
FROM jbaricot/mysql:v1
ENV MYSQL_ROOT_PASSWORD asd123 ENV MYSQL_DATABASE my_db ENV MYSQL_USER jbaricot ENV MYSQL_PASSWORD asdf1234
docker build -t jbaricot/mysql:despliegue_dockerfile ./
docker push jbaricot/mysql:despliegue_dockerfile
docker run -d --name mysql_container_2 -v mysql-volume:/var/lib/mysql jbaricot/mysql:despliegue_dockerfile
docker tag 8251f0669c6e jbaricot/mysql:despliegue_dockercompose
docker push jbaricot/mysql:despliegue_dockercompose
version: "3.8"
services: mysql: image: jbaricot/mysql:despliegue_dockercompose container_name: "mysql_container_3" environment: MYSQL_ROOT_PASSWORD: asd123 MYSQL_DATABASE : my_db MYSQL_USER: jbaricot MYSQL_PASSWORD: asdf1234 volumes: - mysql-volume:/var/lib/mysql
phpmyadmin: image: jbaricot/phpmyadmin:despliegue_dockercompose container_name: "phpmyadmin_container_3" ports: - "8083:80" environment: PMA_HOST: mysql_container_3 MYSQL_ROOT_PASSWORD: asd123 PMA_USER: jbaricot PMA_PASSWORD: asdf1234 depends_on: - mysql volumes: - phpmyadmin-volume:/etc/phpmyadmin
volumes: mysql-volume: external: true phpmyadmin-volume: external: true
docker-compose.yml" up -d --build
Content type
Image
Digest
sha256:20e2fca23…
Size
171 MB
Last updated
over 2 years ago
docker pull jbaricot/mysql:despliegue_dockercompose