Adding `networks` key results in runtime error
surajnarwade opened this issue · 0 comments
surajnarwade commented
for example, with this docker-compose file,
version: '2'
services:
foo:
image: busybox
networks:
- foo
networks:
foo:
I am getting output as:
WARN[0000] Note: This is an experimental alternate implementation of the Compose CLI (https://github.com/docker/compose)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x4d5d18]
goroutine 1 [running]:
panic(0x8701c0, 0xc420010100)
/usr/lib/golang/src/runtime/panic.go:500 +0x1a1
github.com/docker/libcompose/vendor/github.com/urfave/cli.HandleAction.func1(0xc4201a9cc8)
/home/snarwade/go/src/github.com/docker/libcompose/vendor/github.com/urfave/cli/app.go:472 +0x29e
panic(0x8701c0, 0xc420010100)
/usr/lib/golang/src/runtime/panic.go:458 +0x243
github.com/docker/libcompose/project.(*Project).handleNetworkConfig(0xc42009c700)
/home/snarwade/go/src/github.com/docker/libcompose/project/project.go:292 +0x1a8
github.com/docker/libcompose/project.(*Project).load(0xc42009c700, 0x8f9df2, 0x12, 0xc420302c80, 0x61, 0x261, 0x0, 0x0)
/home/snarwade/go/src/github.com/docker/libcompose/project/project.go:245 +0x38f
github.com/docker/libcompose/project.(*Project).Parse(0xc42009c700, 0xd3ed80, 0xc420311450)
/home/snarwade/go/src/github.com/docker/libcompose/project/project.go:123 +0x15a
github.com/docker/libcompose/docker.NewProject(0xc4200dc870, 0x0, 0x0, 0x0, 0x18, 0xc4201a9810)
/home/snarwade/go/src/github.com/docker/libcompose/docker/project.go:58 +0x106
github.com/docker/libcompose/cli/docker/app.(*ProjectFactory).Create(0xd78c70, 0xc4202eeb40, 0x0, 0x8, 0x8, 0xc4202fb280)
/home/snarwade/go/src/github.com/docker/libcompose/cli/docker/app/factory.go:20 +0xae
github.com/docker/libcompose/cli/app.WithProject.func1(0xc4202eeb40, 0x0, 0x0)
/home/snarwade/go/src/github.com/docker/libcompose/cli/app/app.go:45 +0x4e
reflect.Value.call(0x854480, 0xc4202faa00, 0x13, 0x8f222a, 0x4, 0xc4201a9c68, 0x1, 0x1, 0x4711d8, 0x8e3de0, ...)
/usr/lib/golang/src/reflect/value.go:434 +0x5c8
reflect.Value.Call(0x854480, 0xc4202faa00, 0x13, 0xc4201a9c68, 0x1, 0x1, 0x0, 0x140, 0x140)
/usr/lib/golang/src/reflect/value.go:302 +0xa4
github.com/docker/libcompose/vendor/github.com/urfave/cli.HandleAction(0x854480, 0xc4202faa00, 0xc4202eeb40, 0x0, 0x0)
/home/snarwade/go/src/github.com/docker/libcompose/vendor/github.com/urfave/cli/app.go:481 +0x1e0
github.com/docker/libcompose/vendor/github.com/urfave/cli.Command.Run(0x8f1d0b, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8fb8fa, 0x15, 0x0, ...)
/home/snarwade/go/src/github.com/docker/libcompose/vendor/github.com/urfave/cli/command.go:186 +0xc26
github.com/docker/libcompose/vendor/github.com/urfave/cli.(*App).Run(0xc420308180, 0xc42000c4c0, 0x2, 0x2, 0x0, 0x0)
/home/snarwade/go/src/github.com/docker/libcompose/vendor/github.com/urfave/cli/app.go:235 +0x60c
main.main()
/home/snarwade/go/src/github.com/docker/libcompose/cli/main/main.go:75 +0x16d4
otherwise, it works with docker-compose,
$ docker-compose up
Creating tmp_foo_1
Attaching to tmp_foo_1
tmp_foo_1 exited with code 0