Skip to content

Instantly share code, notes, and snippets.

@DawTaylor
Last active September 18, 2017 13:37
Show Gist options
  • Save DawTaylor/3022575739b771de6e14b109c7f25db9 to your computer and use it in GitHub Desktop.
Save DawTaylor/3022575739b771de6e14b109c7f25db9 to your computer and use it in GitHub Desktop.
Docker compose simples para subir um magento
version: '3'
services:
web:
container_name: magento2
image: alexcheng/magento2
ports:
- "80:80"
mysql:
container_name: mysql
image: mysql
environment:
- MYSQL_ROOT_PASSWORD=123123123

Como rodar

Crie uma cópia do arquivo docker-compose.yml em uma pasta local, abra o terminal nessa pasta e rode o comando abaixo.

docker-compose up -d

Depois disso é preciso criar o banco de dados para a instalaço.

Para acessar o container docker exec -it mysql bash

Para criar o bando de dados MYSQL_PWD=123123123 && mysql -u root -p -Bse "create database if not exists magento2"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment