Merge pull request #870 from aluzzardi/stdlib-container-no-search
os.#Container: inherit PATH from the container image
This commit is contained in:
commit
f45e74d134
@ -34,9 +34,6 @@ import (
|
|||||||
let cachePath = "/root/.cache/gocache"
|
let cachePath = "/root/.cache/gocache"
|
||||||
cache: "\(cachePath)": true
|
cache: "\(cachePath)": true
|
||||||
env: GOMODCACHE: cachePath
|
env: GOMODCACHE: cachePath
|
||||||
|
|
||||||
// Add go to search path (FIXME: should be inherited from image metadata)
|
|
||||||
shell: search: "/usr/local/go/bin": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package os
|
package os
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
|
||||||
|
|
||||||
"alpha.dagger.io/dagger"
|
"alpha.dagger.io/dagger"
|
||||||
"alpha.dagger.io/dagger/op"
|
"alpha.dagger.io/dagger/op"
|
||||||
|
|
||||||
@ -68,20 +66,7 @@ import (
|
|||||||
path: string | *"/bin/sh"
|
path: string | *"/bin/sh"
|
||||||
// Arguments to pass to the shell prior to the command
|
// Arguments to pass to the shell prior to the command
|
||||||
args: [...string] | *["-c"]
|
args: [...string] | *["-c"]
|
||||||
// Map of directories to search for commands
|
|
||||||
// In POSIX shells this is used to generate the $PATH
|
|
||||||
// environment variable.
|
|
||||||
search: [string]: bool
|
|
||||||
search: {
|
|
||||||
"/sbin": true
|
|
||||||
"/bin": true
|
|
||||||
"/usr/sbin": true
|
|
||||||
"/usr/bin": true
|
|
||||||
"/usr/local/sbin": true
|
|
||||||
"/usr/local/bin": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
env: PATH: string | *strings.Join([ for p, v in shell.search if v {p}], ":")
|
|
||||||
|
|
||||||
#up: [
|
#up: [
|
||||||
op.#Load & {from: image},
|
op.#Load & {from: image},
|
||||||
|
Reference in New Issue
Block a user