diff --git a/api/types/client.go b/api/types/client.go index 6616cbcd59..9c464b73e2 100644 --- a/api/types/client.go +++ b/api/types/client.go @@ -50,7 +50,7 @@ type ContainerCommitOptions struct { // ContainerExecInspect holds information returned by exec inspect. type ContainerExecInspect struct { - ExecID string + ExecID string `json:"ID"` ContainerID string Running bool ExitCode int diff --git a/integration/container/exec_test.go b/integration/container/exec_test.go index 9c86fcac45..7dc54b554a 100644 --- a/integration/container/exec_test.go +++ b/integration/container/exec_test.go @@ -102,6 +102,10 @@ func TestExec(t *testing.T) { ) assert.NilError(t, err) + inspect, err := client.ContainerExecInspect(ctx, id.ID) + assert.NilError(t, err) + assert.Check(t, is.Equal(inspect.ExecID, id.ID)) + resp, err := client.ContainerExecAttach(ctx, id.ID, types.ExecStartCheck{ Detach: false,