mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
feat: add option for custom socket path (#698)
This commit is contained in:
parent
70fdafa41d
commit
ddb45c943b
4 changed files with 9 additions and 1 deletions
|
@ -67,8 +67,12 @@ func (rc *RunContext) jobContainerName() string {
|
|||
func (rc *RunContext) GetBindsAndMounts() ([]string, map[string]string) {
|
||||
name := rc.jobContainerName()
|
||||
|
||||
if rc.Config.ContainerDaemonSocket == "" {
|
||||
rc.Config.ContainerDaemonSocket = "/var/run/docker.sock"
|
||||
}
|
||||
|
||||
binds := []string{
|
||||
fmt.Sprintf("%s:%s", "/var/run/docker.sock", "/var/run/docker.sock"),
|
||||
fmt.Sprintf("%s:%s", rc.Config.ContainerDaemonSocket, "/var/run/docker.sock"),
|
||||
}
|
||||
|
||||
mounts := map[string]string{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue