From db459ae04da9a384eeaba8907ae4ec0084b7bc80 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Wed, 4 Aug 2021 16:56:52 +0200 Subject: [PATCH] os.#Container: inherit PATH from the container image Signed-off-by: Andrea Luzzardi --- stdlib/go/go.cue | 3 --- stdlib/os/container.cue | 15 --------------- 2 files changed, 18 deletions(-) diff --git a/stdlib/go/go.cue b/stdlib/go/go.cue index 423dd947..4928b7ee 100644 --- a/stdlib/go/go.cue +++ b/stdlib/go/go.cue @@ -34,9 +34,6 @@ import ( let cachePath = "/root/.cache/gocache" cache: "\(cachePath)": true env: GOMODCACHE: cachePath - - // Add go to search path (FIXME: should be inherited from image metadata) - shell: search: "/usr/local/go/bin": true } } diff --git a/stdlib/os/container.cue b/stdlib/os/container.cue index ede2ccbc..4e537205 100644 --- a/stdlib/os/container.cue +++ b/stdlib/os/container.cue @@ -1,8 +1,6 @@ package os import ( - "strings" - "alpha.dagger.io/dagger" "alpha.dagger.io/dagger/op" @@ -68,20 +66,7 @@ import ( path: string | *"/bin/sh" // Arguments to pass to the shell prior to the command 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: [ op.#Load & {from: image},