Generic driver does not add user to docker group

pull/10099/head
Anders F Björklund 2019-07-14 16:34:24 +02:00
parent c07666957a
commit 7c5ba62e8d
1 changed files with 6 additions and 0 deletions

View File

@ -95,6 +95,12 @@ 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)
}