Skip to content

Commit

Permalink
plugincontainer: Fix container logs context to have no timeout/cancel (
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhjp authored Sep 14, 2023
1 parent c3769e6 commit 7a5e901
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugincontainer/container_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ func (c *containerRunner) Start(ctx context.Context) error {
}

// ContainerLogs combines stdout and stderr.
logReader, err := c.dockerClient.ContainerLogs(ctx, c.id, types.ContainerLogsOptions{
// Container logs will stream beyond the lifetime of the initial start
// context, so we pass it a fresh context with no timeout.
logReader, err := c.dockerClient.ContainerLogs(context.Background(), c.id, types.ContainerLogsOptions{
Follow: true,
ShowStdout: true,
ShowStderr: true,
Expand Down

0 comments on commit 7a5e901

Please sign in to comment.