按照文档上写的手动建库,然后
docker run --detach --name solo --network=host \
--env RUNTIME_DB="MYSQL" \ --env JDBC_USERNAME="root" \
--env JDBC_PASSWORD="123456" \
--env JDBC_DRIVER="com.mysql.cj.jdbc.Driver" \
--env JDBC_URL="jdbc:mysql://127.0.0.1:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC" \
b3log/solo --listen_port=8080 --server_scheme=http --server_host=linux的ip地址 --server_port=
然后发现 mysql 中的表已经自动生成了,但是浏览器想访问 ip 地址一直访问不到,
查看 docker logs 发现
2019-09-18T08:55:57.997836071Z [INFO ]-[2019-09-18 16:55:57]-[org.b3log.solo.SoloServletListener:99]: Solo is booting [ver=3.6.5, servletContainer=jetty/9.4.12.v20180830, os=Linux, isDocker=true, luteAvailable=false, pid=1, runtimeDatabase=MYSQL, runtimeMode=PRODUCTION, jdbc.username=root, jdbc.URL=jdbc:mysql://127.0.0.1:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC]
2019-09-18T08:55:58.043959940Z [INFO ]-[2019-09-18 16:55:58]-[com.zaxxer.hikari.HikariDataSource:110]: HikariPool-1 - Starting...
2019-09-18T08:55:59.345931926Z [INFO ]-[2019-09-18 16:55:59]-[com.zaxxer.hikari.HikariDataSource:123]: HikariPool-1 - Start completed.
2019-09-18T08:55:59.667896491Z [WARN ]-[2019-09-18 16:55:59]-[org.b3log.solo.service.InitService:161]: Solo has not been initialized, please open your browser to init Solo
不知道是为啥呀。。。