forked from Ivasoft/github-actions
Link hidden docker socket to the expected path
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user