Link hidden docker socket to the expected path
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-07-28 19:38:52 +02:00
parent 836c1329fa
commit 32246a5328
2 changed files with 13 additions and 16 deletions

View File

@@ -4,6 +4,14 @@ import (
"fmt"
"os/exec"
"time"
"github.com/pkg/errors"
"os"
)
const (
StdDockerSocketPath = "/var/run/docker.sock"
HiddenDockerSocketPath = "/var/run/hidden_docker.sock"
)
type Daemon struct {
@@ -26,6 +34,10 @@ type Daemon struct {
func StartDaemon(d Daemon) error {
if !d.Disabled {
startDaemon(d)
} else if !d.NotHiddenSocket {
if err := os.Link(HiddenDockerSocketPath, StdDockerSocketPath); err != nil {
return errors.Wrap(err, "failed to link hidden docker socket to common one")
}
}
return waitForDaemon()
}