Skip to content

Commit 94b62ca

Browse files
committed
remove buildkitd start script
1 parent ed46b45 commit 94b62ca

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

pkg/minikube/cruntime/containerd.go

-23
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,6 @@ func downloadRemote(cr CommandRunner, src string) (string, error) {
358358

359359
// BuildImage builds an image into this runtime
360360
func (r *Containerd) BuildImage(src string, file string, tag string, push bool, env []string, opts []string) error {
361-
if err := r.initBuildkitDaemon(); err != nil {
362-
return fmt.Errorf("failed to init buildkit daemon: %v", err)
363-
}
364-
365361
// download url if not already present
366362
dir, err := downloadRemote(r.Runner, src)
367363
if err != nil {
@@ -412,25 +408,6 @@ func (r *Containerd) BuildImage(src string, file string, tag string, push bool,
412408
return nil
413409
}
414410

415-
func (r *Containerd) initBuildkitDaemon() error {
416-
// if daemon is already running, do nothing
417-
cmd := exec.Command("pgrep", "buildkitd")
418-
if _, err := r.Runner.RunCmd(cmd); err == nil {
419-
return nil
420-
}
421-
422-
// otherwise, start daemon
423-
cmd = exec.Command("/bin/bash", "-c", "sudo -b buildkitd --oci-worker false --containerd-worker true --containerd-worker-namespace k8s.io &> /dev/null")
424-
if _, err := r.Runner.RunCmd(cmd); err != nil {
425-
return fmt.Errorf("failed to start buildkit daemon: %v", err)
426-
}
427-
428-
// give the daemon time to finish starting up or image build will fail
429-
time.Sleep(1 * time.Second)
430-
431-
return nil
432-
}
433-
434411
// CGroupDriver returns cgroup driver ("cgroupfs" or "systemd")
435412
func (r *Containerd) CGroupDriver() (string, error) {
436413
info, err := getCRIInfo(r.Runner)

0 commit comments

Comments
 (0)