aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/machine/wsl/machine.go10
-rw-r--r--pkg/specgen/generate/container.go19
2 files changed, 23 insertions, 6 deletions
diff --git a/pkg/machine/wsl/machine.go b/pkg/machine/wsl/machine.go
index 1da042f6a..dff7bfef9 100644
--- a/pkg/machine/wsl/machine.go
+++ b/pkg/machine/wsl/machine.go
@@ -830,7 +830,15 @@ func launchWinProxy(v *MachineVM) (bool, string, error) {
return globalName, "", err
}
- dest := fmt.Sprintf("ssh://root@localhost:%d/run/podman/podman.sock", v.Port)
+ destSock := "/run/user/1000/podman/podman.sock"
+ forwardUser := v.RemoteUsername
+
+ if v.Rootful {
+ destSock = "/run/podman/podman.sock"
+ forwardUser = "root"
+ }
+
+ dest := fmt.Sprintf("ssh://%s@localhost:%d%s", forwardUser, v.Port, destSock)
args := []string{v.Name, stateDir, pipePrefix + machinePipe, dest, v.IdentityPath}
waitPipe := machinePipe
if globalName {
diff --git a/pkg/specgen/generate/container.go b/pkg/specgen/generate/container.go
index f7ea2edfa..5f4218899 100644
--- a/pkg/specgen/generate/container.go
+++ b/pkg/specgen/generate/container.go
@@ -67,12 +67,21 @@ func CompleteSpec(ctx context.Context, r *libpod.Runtime, s *specgen.SpecGenerat
// NOTE: the health check is only set for Docker images
// but inspect will take care of it.
s.HealthConfig = inspectData.HealthCheck
- if s.HealthConfig != nil && s.HealthConfig.Timeout == 0 {
- hct, err := time.ParseDuration(define.DefaultHealthCheckTimeout)
- if err != nil {
- return nil, err
+ if s.HealthConfig != nil {
+ if s.HealthConfig.Timeout == 0 {
+ hct, err := time.ParseDuration(define.DefaultHealthCheckTimeout)
+ if err != nil {
+ return nil, err
+ }
+ s.HealthConfig.Timeout = hct
+ }
+ if s.HealthConfig.Interval == 0 {
+ hct, err := time.ParseDuration(define.DefaultHealthCheckInterval)
+ if err != nil {
+ return nil, err
+ }
+ s.HealthConfig.Interval = hct
}
- s.HealthConfig.Timeout = hct
}
}