docker-leanote icon indicating copy to clipboard operation
docker-leanote copied to clipboard

docker构建时运行时报错

Open fly2008begin opened this issue 3 years ago • 5 comments

fly2008begin avatar Sep 03 '20 11:09 fly2008begin

使用nodb的DockerFile构建后,运行时log报错

DEBUG 18:52:35 revel server.go:106: InitServerEngine: Found server engine and invoking section=ser ver name=go panic: init: router initialize error goroutine 1 [running]: github.com/leanote/leanote/vendor/github.com/revel/revel/logger.(*RevelLogger).Panic(0xc420040ec0, 0 xb5a473, 0x1d, 0xc4203a9ca0, 0x2, 0x2) /Users/life/Documents/Go/package_base/src/github.com/leanote/leanote/vendor/github.com/revel /revel/logger/logger.go:149 +0xaf github.com/leanote/leanote/vendor/github.com/revel/revel.init.5.func1() /Users/life/Documents/Go/package_base/src/github.com/leanote/leanote/vendor/github.com/revel /revel/router.go:840 +0x241 github.com/leanote/leanote/vendor/github.com/revel/revel.runStartupHooks() /Users/life/Documents/Go/package_base/src/github.com/leanote/leanote/vendor/github.com/revel /revel/server.go:126 +0x7f github.com/leanote/leanote/vendor/github.com/revel/revel.InitServer() /Users/life/Documents/Go/package_base/src/github.com/leanote/leanote/vendor/github.com/revel /revel/server.go:37 +0x39 github.com/leanote/leanote/vendor/github.com/revel/revel.Run(0x0) /Users/life/Documents/Go/package_base/src/github.com/leanote/leanote/vendor/github.com/revel /revel/server.go:69 +0xd4 main.main() /Users/life/Documents/Go/package_base/src/github.com/leanote/leanote/app/tmp/main.go:2312 +0 x223d5

fly2008begin avatar Sep 03 '20 11:09 fly2008begin

/data/leanote/conf/app.conf 文件需要映射,还需要一个初始化好数据的mongodb。

我使用axboy/leanote:nodb 一切正常,dockerhub通过nodb的dockerfile构建的

axboy avatar Sep 10 '20 07:09 axboy

/data/leanote/conf/app.conf 文件需要映射,还需要一个初始化好数据的mongodb。

我使用axboy/leanote:nodb 一切正常,dockerhub通过nodb的dockerfile构建的

能否给分享个完整镜像,我尝试了多次都没有成功 好像总是go语言的哪个依赖time out

fly2008begin avatar Sep 15 '20 01:09 fly2008begin

你使用docker hub 的axboy/leanote:nodb看看,或者用latest的镜像

axboy avatar Sep 15 '20 10:09 axboy

db.host=172.17.0.1 #数据库地址 db.port=27017 db.dbname=leanote # required db.username= # 数据库用户名,默认留空 db.password= # 数据库密码,默认留空

1.用docker0的网卡的地址 2.用户名密码为空 233

cdlaimin avatar Jan 24 '22 08:01 cdlaimin