Skip to content

Commit 5ff7b32

Browse files
orchestrator: fix provision in case the container need to be pulled (#468)
1 parent fd6c147 commit 5ff7b32

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/orchestrator/provision.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,12 @@ func dynamicProvisioning(
142142
if err := pullBasePythonContainer(ctx, pythonImage); err != nil {
143143
return fmt.Errorf("provisioning failed to pull base image: %w", err)
144144
}
145+
// Now that we have pulled the container we recreate it
146+
resp, err = docker.ContainerCreate(ctx, containerCfg, containerHostCfg, nil, nil, "")
147+
}
148+
if err != nil {
149+
return fmt.Errorf("provisiong failed to create container: %w", err)
145150
}
146-
return fmt.Errorf("provisiong failed to create container: %w", err)
147151
}
148152

149153
slog.Debug("provisioning container created", slog.String("container_id", resp.ID))

0 commit comments

Comments
 (0)