mirror of
https://github.com/containers/podman.git
synced 2025-11-28 09:09:44 +08:00
Tremendous amount of changes in here, but all should amount to the same thing: changing Go import paths from v5 to v6. Also bumped go.mod to github.com/containers/podman/v6 and updated version to v6.0.0-dev. Signed-off-by: Matt Heon <mheon@redhat.com>
30 lines
977 B
Go
30 lines
977 B
Go
//go:build amd64 || arm64
|
|
|
|
package machine
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/containers/podman/v6/pkg/machine/ignition"
|
|
"github.com/containers/podman/v6/pkg/machine/vmconfigs"
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func UpdatePodmanDockerSockService(mc *vmconfigs.MachineConfig) error {
|
|
content := ignition.GetPodmanDockerTmpConfig(mc.HostUser.UID, mc.HostUser.Rootful, false)
|
|
command := fmt.Sprintf("'echo %q > %s'", content, ignition.PodmanDockerTmpConfPath)
|
|
args := []string{"sudo", "bash", "-c", command}
|
|
if err := LocalhostSSH(mc.SSH.RemoteUsername, mc.SSH.IdentityPath, mc.Name, mc.SSH.Port, args); err != nil {
|
|
logrus.Warnf("Could not update internal docker sock config")
|
|
return err
|
|
}
|
|
|
|
args = []string{"sudo", "systemd-tmpfiles", "--create", "--prefix=/run/docker.sock"}
|
|
if err := LocalhostSSH(mc.SSH.RemoteUsername, mc.SSH.IdentityPath, mc.Name, mc.SSH.Port, args); err != nil {
|
|
logrus.Warnf("Could not create internal docker sock")
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|