业余新人自建 Docker 镜像运行遇到 panic 错误求搭救

2016-12-07 09:51:54 +08:00
 alex321
情况是这样的。我自己用 vbox 装了个 Ubuntu 14.04.5 ,然后安装了 Docker ,接着使用 Dockerfile 构建了一个镜像,构建成功,返回了 success 消息,并且本地也看到了构建成功的镜像。然后我执行 docker run -i -t 就遭遇了 panic 错误了。 Google 一圈在 GitHub 上发现了类似问题,但还是没有具体的解决头绪。

错误内容从 Xshell 里面摘录下来是这样的:

panic: standard_init_linux.go:175: exec user process caused "no such file or directory" [recovered]
panic: standard_init_linux.go:175: exec user process caused "no such file or directory"

goroutine 1 [running, locked to thread]:
panic(0x7ddea0, 0xc82010f260)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
github.com/urfave/cli.HandleAction.func1(0xc8200d92e8)
/go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:478 +0x38e
panic(0x7ddea0, 0xc82010f260)
/usr/local/go/src/runtime/panic.go:443 +0x4e9
github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization.func1(0xc8200d8bf8, 0xc82001a0c8, 0xc8200d8d08)
/go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:259 +0x136
github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization(0xc820051630, 0x7f699ee6e728, 0xc82010f260)
/go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:277 +0x5b1
main.glob.func8(0xc82006ea00, 0x0, 0x0)
/go/src/github.com/opencontainers/runc/main_unix.go:26 +0x68
reflect.Value.call(0x7448a0, 0x8f0bd0, 0x13, 0x839998, 0x4, 0xc8200d9268, 0x1, 0x1, 0x0, 0x0, ...)
/usr/local/go/src/reflect/value.go:435 +0x120d
reflect.Value.Call(0x7448a0, 0x8f0bd0, 0x13, 0xc8200d9268, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:303 +0xb1
github.com/urfave/cli.HandleAction(0x7448a0, 0x8f0bd0, 0xc82006ea00, 0x0, 0x0)
/go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:487 +0x2ee
github.com/urfave/cli.Command.Run(0x83c828, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8d0180, 0x51, 0x0, ...)
/go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/command.go:191 +0xfec
github.com/urfave/cli.(*App).Run(0xc820001500, 0xc82000a100, 0x2, 0x2, 0x0, 0x0)
/go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:240 +0xaa4
main.main()
/go/src/github.com/opencontainers/runc/main.go:137 +0xe24

求搭救。。
7788 次点击
所在节点    问与答
4 条回复
alex321
2016-12-07 11:30:55 +08:00
Update: 2016.12.07 11:30AM 已解决。
Hardcore0331
2016-12-23 18:11:40 +08:00
请问是怎么解决的?
Hardcore0331
2016-12-23 19:00:32 +08:00
我是在 Dockerfile 中有 ENTRYPOINT ["/init.sh"] 就会报错,错误跟题主是一样的
alex321
2016-12-24 18:25:18 +08:00
@Hardcore0331 我当时引入了本地文件地址,后来改成网络地址 wget 到本地然后 copy 就就可以了。希望可以帮到你。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/325826

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX