Add basic dynamic configuration with volume labels

This commit is contained in:
Romain de Laage
2022-11-13 16:53:08 +01:00
parent d0d2fcf0f2
commit 59b2d6f70e
7 changed files with 170 additions and 8 deletions

View File

@@ -169,6 +169,9 @@ func (b Backend) ExecDocker(l Location, args []string) (int, string, error) {
"--workdir", dir,
"--volume", volume + ":" + dir,
}
if flags.DOCKER_HOST != "" {
docker = append([]string{"--host", flags.DOCKER_HOST}, docker...)
}
// Use of docker host, not the container host
if hostname, err := os.Hostname(); err == nil {
docker = append(docker, "--hostname", hostname)