Answer the question
In order to leave comments, you need to log in
How to rebuild docker container with new settings?
Here is the content of docker-compose.yml:
version: '3.1'
services:
db:
build: ./db
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
adminer:
build: ./adminer
restart: always
ports:
- 5080:8080
version: '3.1'
services:
db:
build: ./db
restart: always
environment:
MYSQL_ROOT_PASSWORD: 123456
adminer:
build: ./adminer
restart: always
ports:
- 5080:8080
Answer the question
In order to leave comments, you need to log in
https://hub.docker.com/_/mysql:
"If you start your mysql container instance with a data directory that already contains a database (specifically, a mysql subdirectory), the $MYSQL_ROOT_PASSWORD variable should be omitted from the run command line; it will in any case be ignored, and the pre-existing database will not be changed in any way."
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question