Need to set up docker group in start - not in fix
It was only called for existing machines, not for new. But other commands expect to be able to run "docker".pull/10099/head
parent
d96d3befbe
commit
a0d2c1a0c5
|
@ -95,12 +95,6 @@ func fixHost(api libmachine.API, cc *config.ClusterConfig, n *config.Node) (*hos
|
|||
return h, nil
|
||||
}
|
||||
|
||||
if h.Driver.DriverName() == driver.Generic {
|
||||
if _, err := h.RunSSHCommand(fmt.Sprintf("sudo usermod -aG docker %s", h.Driver.GetSSHUsername())); err != nil {
|
||||
return h, errors.Wrap(err, "usermod")
|
||||
}
|
||||
}
|
||||
|
||||
return h, ensureSyncedGuestClock(h, driverName)
|
||||
}
|
||||
|
||||
|
|
|
@ -168,6 +168,12 @@ func createHost(api libmachine.API, cfg *config.ClusterConfig, n *config.Node) (
|
|||
return h, errors.Wrap(err, "post-start")
|
||||
}
|
||||
|
||||
if h.Driver.DriverName() == driver.Generic {
|
||||
if _, err := h.RunSSHCommand(fmt.Sprintf("sudo usermod -aG docker %s", h.Driver.GetSSHUsername())); err != nil {
|
||||
return h, errors.Wrap(err, "usermod")
|
||||
}
|
||||
}
|
||||
|
||||
if err := saveHost(api, h, cfg, n); err != nil {
|
||||
return h, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue