mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 18:08:51 +08:00 
			
		
		
		
	 72f1617fac
			
		
	
	72f1617fac
	
	
	
		
			
			Moving from Go module v4 to v5 prepares us for public releases. Move done using gomove [1] as with the v3 and v4 moves. [1] https://github.com/KSubedi/gomove Signed-off-by: Matt Heon <mheon@redhat.com>
		
			
				
	
	
		
			30 lines
		
	
	
		
			975 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			975 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| //go:build amd64 || arm64
 | |
| 
 | |
| package machine
 | |
| 
 | |
| import (
 | |
| 	"fmt"
 | |
| 
 | |
| 	"github.com/containers/podman/v5/pkg/machine/ignition"
 | |
| 	"github.com/containers/podman/v5/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 := CommonSSH(mc.SSH.RemoteUsername, mc.SSH.IdentityPath, mc.Name, mc.SSH.Port, args); err != nil {
 | |
| 		logrus.Warnf("Could not not update internal docker sock config")
 | |
| 		return err
 | |
| 	}
 | |
| 
 | |
| 	args = []string{"sudo", "systemd-tmpfiles", "--create", "--prefix=/run/docker.sock"}
 | |
| 	if err := CommonSSH(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
 | |
| }
 |