1. 拉取mysql8的镜像并运行
docker pull mysqldocker run -d -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
2. 进入mysql,创建并修改权限
docker exec -it mysql bashmysql -uroot -puse mysql;create user 'wiki'@'localhost' identified by 'vegasd1234';create user 'wiki'@'%' identified by 'vegasd1234';create database `wiki`;grant all privileges on wiki.* to 'wiki'@'localhost';grant all privileges on wiki.* to 'wiki'@'%';flush privileges;select host,user,authentication_string,plugin from user;alter user 'wiki'@'%' identified with mysql_native_password by 'vegasd1234';
3. 拉取wiki.js镜像并运行
docker pull requarks/wikidocker run -d -p 82:3000 --name wiki --restart unless-stopped -e "DB_TYPE=mysql" -e "DB_HOST=10.1.0.105" -e "DB_PORT=3306" -e "DB_USER=wiki" -e "DB_PASS=vegasd1234" -e "DB_NAME=wiki" requarks/wiki:latest
4. 打开浏览器,访问
http://10.1.0.105:82/ 进行设置,即可。
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。