官方并没有提供官方镜像,但是在安装包里提供了镜像制作文件。
wget https://github.com/cookieY/Yearning/releases/download/2.3.5/Yearning-2.3.5-linux-amd64.zip
unzip Yearning-2.3.5-linux-amd64.zip -d yearning-2.3.5
cd yearning-2.3.5
制作镜像:
docker build -t yearning:2.3.5 .
初始化数据库相关:
create database yearning;
CREATE USER 'yearning'@'yearning所在机器ip' IDENTIFIED BY 'password';
GRANT ALL ON yearning.* TO 'yearning'@'yearning所在机器ip';
FLUSH PRIVILEGES;
docker run -d -it -p 8000:8000 -e MYSQL_USER=yearning -e MYSQL_ADDR=mysql域名:3306 -e MYSQL_PASSWORD=123456 -e MYSQL_DB=yearning yearning:2.3.5
查看日志:docker logs -f 容器id
登陆:
http://ip:8000
登陆后:
必须修改admin密码:
参看资料:
https://guide.yearning.io/