Answer the question
In order to leave comments, you need to log in
How to run mysql in docker container?
Good afternoon! It was necessary to deploy the project locally using docker. Never had a chance to work with him before. I raised the container using docker-compose up. I went into the container via ssh. And now, for an hour, I can’t figure out how to start working with mysql inside the container. Or maybe I don’t understand something and I need to work with mysql somehow differently? The docker-compose.yml file is attached.
version: "2"
services:
powder:
image: webdevops/php-apache-dev:centos-7-php56
volumes:
- powder-data:/var/www
- ./apache/site.conf:/etc/httpd/conf.d/site.conf
network_mode: "bridge"
ports:
- "80:80"
- "3306:3306"
- "2222:22"
- "443:443"
hostname: "site.local"
environment:
- XDEBUG_REMOTE_CONNECT_BACK=0
- ALTNAME="DNS:change.me"
powder-mysql:
image: mysql:5.6.27 # Stage version
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=1
network_mode: "service:powder"
volumes:
- powder-mysql-data:/var/lib/mysql
- ./mysql/fix-apt-get.sh:/docker-entrypoint-initdb.d/fix-apt-get.sh
volumes:
powder-mysql-data:
powder-data:
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question