summaryrefslogtreecommitdiff
path: root/commands.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands.go')
-rw-r--r--commands.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/commands.go b/commands.go
index 96e2de1..aa562e3 100644
--- a/commands.go
+++ b/commands.go
@@ -69,6 +69,12 @@ func (w *commandWrapper) flush() {
func NewChrootCommandForContext(context DebosContext) Command {
c := Command{Architecture: context.Architecture, Chroot: context.Rootdir, ChrootMethod: CHROOT_METHOD_NSPAWN}
+ if context.EnvironVars != nil {
+ for k, v := range context.EnvironVars {
+ c.AddEnv(fmt.Sprintf("%s=%s", k, v))
+ }
+ }
+
if context.Image != "" {
path, err := RealPath(context.Image)
if err == nil {