Skip to content

Commit

Permalink
remove buildkitd start script
Browse files Browse the repository at this point in the history
  • Loading branch information
spowelljr committed Aug 13, 2021
1 parent ed46b45 commit 94b62ca
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions pkg/minikube/cruntime/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,6 @@ func downloadRemote(cr CommandRunner, src string) (string, error) {

// BuildImage builds an image into this runtime
func (r *Containerd) BuildImage(src string, file string, tag string, push bool, env []string, opts []string) error {
if err := r.initBuildkitDaemon(); err != nil {
return fmt.Errorf("failed to init buildkit daemon: %v", err)
}

// download url if not already present
dir, err := downloadRemote(r.Runner, src)
if err != nil {
Expand Down Expand Up @@ -412,25 +408,6 @@ func (r *Containerd) BuildImage(src string, file string, tag string, push bool,
return nil
}

func (r *Containerd) initBuildkitDaemon() error {
// if daemon is already running, do nothing
cmd := exec.Command("pgrep", "buildkitd")
if _, err := r.Runner.RunCmd(cmd); err == nil {
return nil
}

// otherwise, start daemon
cmd = exec.Command("/bin/bash", "-c", "sudo -b buildkitd --oci-worker false --containerd-worker true --containerd-worker-namespace k8s.io &> /dev/null")
if _, err := r.Runner.RunCmd(cmd); err != nil {
return fmt.Errorf("failed to start buildkit daemon: %v", err)
}

// give the daemon time to finish starting up or image build will fail
time.Sleep(1 * time.Second)

return nil
}

// CGroupDriver returns cgroup driver ("cgroupfs" or "systemd")
func (r *Containerd) CGroupDriver() (string, error) {
info, err := getCRIInfo(r.Runner)
Expand Down

0 comments on commit 94b62ca

Please sign in to comment.