Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions plugincontainer/container_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ func (c *containerRunner) Start(ctx context.Context) error {
c.id = resp.ID
c.logger.Trace("created container", "image", c.image, "id", c.id)

if err := c.dockerClient.ContainerStart(ctx, c.id, types.ContainerStartOptions{}); err != nil {
if err := c.dockerClient.ContainerStart(ctx, c.id, container.StartOptions{}); err != nil {
return fmt.Errorf("error starting container: %w", err)
}

// ContainerLogs combines stdout and stderr.
// 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{
logReader, err := c.dockerClient.ContainerLogs(context.Background(), c.id, container.LogsOptions{
Follow: true,
ShowStdout: true,
ShowStderr: true,
Expand Down Expand Up @@ -279,7 +279,7 @@ func (c *containerRunner) Kill(ctx context.Context) error {
if c.id != "" {
if c.debug {
defer func() {
err := c.dockerClient.ContainerRemove(ctx, c.id, types.ContainerRemoveOptions{
err := c.dockerClient.ContainerRemove(ctx, c.id, container.RemoveOptions{
Force: true,
})
if err != nil {
Expand Down Expand Up @@ -414,7 +414,7 @@ Check stdout in the logs below.
}

func (c *containerRunner) diagnoseLogs(ctx context.Context) string {
logReader, err := c.dockerClient.ContainerLogs(ctx, c.id, types.ContainerLogsOptions{
logReader, err := c.dockerClient.ContainerLogs(ctx, c.id, container.LogsOptions{
ShowStdout: true,
ShowStderr: true,
Follow: false,
Expand Down