@@ -30,7 +30,7 @@ var concurrentInstallMatcher = regexp.MustCompile(`is already in use by containe
3030// FindControllerContainer searches for a running controller container. It
3131// returns the ID of the container (if found), the container name (if any), the
3232// full container summary (if found), or any error that occurred.
33- func FindControllerContainer (ctx context.Context , dockerClient * client.Client ) (string , string , container.Summary , error ) {
33+ func FindControllerContainer (ctx context.Context , dockerClient client.ContainerAPIClient ) (string , string , container.Summary , error ) {
3434 // Before listing, prune any stopped controller containers.
3535 if err := PruneControllerContainers (ctx , dockerClient , true , NoopPrinter ()); err != nil {
3636 return "" , "" , container.Summary {}, fmt .Errorf ("unable to prune stopped model runner containers: %w" , err )
@@ -61,7 +61,7 @@ func FindControllerContainer(ctx context.Context, dockerClient *client.Client) (
6161// determineBridgeGatewayIP attempts to identify the engine's host gateway IP
6262// address on the bridge network. It may return an empty IP address even with a
6363// nil error if no IP could be identified.
64- func determineBridgeGatewayIP (ctx context.Context , dockerClient * client.Client ) (string , error ) {
64+ func determineBridgeGatewayIP (ctx context.Context , dockerClient client.NetworkAPIClient ) (string , error ) {
6565 bridge , err := dockerClient .NetworkInspect (ctx , "bridge" , network.InspectOptions {})
6666 if err != nil {
6767 return "" , err
@@ -75,7 +75,7 @@ func determineBridgeGatewayIP(ctx context.Context, dockerClient *client.Client)
7575}
7676
7777// waitForContainerToStart waits for a container to start.
78- func waitForContainerToStart (ctx context.Context , dockerClient * client.Client , containerID string ) error {
78+ func waitForContainerToStart (ctx context.Context , dockerClient client.ContainerAPIClient , containerID string ) error {
7979 // Unfortunately the Docker API's /containers/{id}/wait API (and the
8080 // corresponding Client.ContainerWait method) don't allow waiting for
8181 // container startup, so instead we'll take a polling approach.
@@ -201,7 +201,7 @@ func CreateControllerContainer(ctx context.Context, dockerClient *client.Client,
201201
202202// PruneControllerContainers stops and removes any model runner controller
203203// containers.
204- func PruneControllerContainers (ctx context.Context , dockerClient * client.Client , skipRunning bool , printer StatusPrinter ) error {
204+ func PruneControllerContainers (ctx context.Context , dockerClient client.ContainerAPIClient , skipRunning bool , printer StatusPrinter ) error {
205205 // Identify all controller containers.
206206 containers , err := dockerClient .ContainerList (ctx , container.ListOptions {
207207 All : true ,
0 commit comments