Skip to content

Commit

Permalink
Better container creation error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
grussorusso committed Oct 7, 2024
1 parent bd239b5 commit 02eb4f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/container/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ func (cf *DockerFactory) Create(image string, opts *ContainerOptions) (Container
Tty: false,
}, &container.HostConfig{Resources: contResources}, nil, nil, "")

if err != nil {
log.Printf("Could not create the container: %v\n", err)
return "", err
}

id := resp.ID

r, err := cf.cli.ContainerInspect(cf.ctx, id)
Expand Down

0 comments on commit 02eb4f5

Please sign in to comment.