Answer the question
In order to leave comments, you need to log in
How to use my.cng MySql in Docker?
Good afternoon. Have customized containers
version: '3'
services:
nginx:
image: nginx:latest
ports:
- "80:80"
- "443:443"
volumes:
- ./hosts:/etc/nginx/conf.d
- ./www:/var/www
- ./logs:/var/log/nginx
links:
- php
php:
build: ./images/php
links:
- mysql
volumes:
- ./www:/var/www
mysql:
image: mysql:8
ports:
- "3306:3306"
volumes:
- ./mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: password
mysql:
image: mysql:8
ports:
- "3306:3306"
volumes:
- ./mysql:/var/lib/mysql
- ./mysql/my.cnf:/etc/my.cnf
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