mirror of https://github.com/docker/docs.git
Basic go example was not working with v1.41
Fixed go example: 1) so that it actually compiles, and 2) so that you get to see the output `hello world` in visual studio code's console (`Tty: true,`).
This commit is contained in:
parent
0f4122dec2
commit
14e83cac6d
|
@ -66,8 +66,8 @@ func main() {
|
||||||
resp, err := cli.ContainerCreate(ctx, &container.Config{
|
resp, err := cli.ContainerCreate(ctx, &container.Config{
|
||||||
Image: "alpine",
|
Image: "alpine",
|
||||||
Cmd: []string{"echo", "hello world"},
|
Cmd: []string{"echo", "hello world"},
|
||||||
Tty: true,
|
Tty: false,
|
||||||
}, nil, nil, "")
|
}, nil, nil, nil, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue