需要先准备一个数据库redmine ,编码为utf8 ,utf8_unicode_ci ,不要使用utf8mb4
新建用户redmine密码为redmine,并授权redmine库所有权限给redmine
create user 'redmine'@'%' identified by 'redmine'; -- 创建用户 grant all on redmine.* to redmine -- 授权
拉镜像
docker pull redmine
创建目录
mkdir /data/redmine/data mkdir /data/redmine/files
运行
docker run --name=redmine -d -e REDMINE_DB_MYSQL=192.168.1.3 -e REDMINE_DB_PORT=3306 -e REDMINE_DB_DATABASE=redmine -e REDMINE_DB_USERNAME=redmine -e REDMINE_DB_PASSWORD=redmine -p 3000:3000 --restart=always -v=/data/redmine/data:/home/redmine/data -v /data/redmine/files:/usr/src/redmine/files redmine