- 部署mysql
docker run -d --ip 172.17.0.9 -v /data/mysql/data:/var/lib/mysql -v /data/mysql/conf:/etc/mysql/conf.d --name mysql -e TZ=Asia/Shanghai -e MYSQL_ROOT_PASSWORD=1234 -p 3306:3306 mysql:latest
create user 'redmine'@'localhost' identified by '1234';
create user 'redmine'@'%' identified by '1234';
create database `redmine`;
alter user 'redmine'@'%' identified with mysql_native_password by '1234';
grant all privileges on *.* to 'redmine'@'%';
flush privileges;
select host,user,authentication_string,plugin from user;
- 部署redmine
docker run -d --name redmine --ip 172.17.0.10 -e REDMINE_DB_PORT=3306 -e REDMINE_DB_DATABASE=redmine -e REDMINE_DB_USERNAME=redmine -e REDMINE_DB_PASSWORD=1234 -p 3000:3000 redmine
- 浏览器打开
http://localhost:3000/