Skip to content

Commit

Permalink
Fixes #131: expose docker certs to the VM
Browse files Browse the repository at this point in the history
  • Loading branch information
abiosoft committed Feb 10, 2022
1 parent e6150e1 commit 0f3ed37
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion environment/container/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,19 @@ func (d dockerRuntime) copyCerts() error {

// we are utilising the host cache path as it is the only guaranteed mounted path.

// copy to cache dir
dockerCertsCacheDir := filepath.Join(config.CacheDir(), "docker-certs")
if err := d.host.RunQuiet("mkdir", "-p", dockerCertsCacheDir); err != nil {
return err
}
if err := d.host.RunQuiet("cp", "-R", dockerCertsDirHost+"/.", dockerCertsCacheDir); err != nil {
return err
}

// copy from cache to vm
if err := d.guest.RunQuiet("sudo", "mkdir", "-p", dockerCertsDirGuest); err != nil {
return err
}

return d.guest.RunQuiet("sudo", "cp", "-R", dockerCertsCacheDir+"/.", dockerCertsDirGuest)
}()

Expand Down

0 comments on commit 0f3ed37

Please sign in to comment.