From edf94c9db8747ad4d6e2db8883221e1e4b497da6 Mon Sep 17 00:00:00 2001 From: Mikhail Gordeev Date: Fri, 10 Feb 2023 15:59:54 +0300 Subject: [PATCH] Add workdir to distoless.toml format --- build.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.py b/build.py index 66c31f8..2347fed 100755 --- a/build.py +++ b/build.py @@ -83,6 +83,10 @@ class Distroless: for option in ["cmd", "entrypoint", "user"]: if value := dd.get(option): self.config_options.append(f"--{option}={value}") + if value := dd.get("workdir"): + self.config_options.append(f"--workingdir={value}") + elif value := dd.get("workingdir"): + self.config_options.append(f"--workingdir={value}") class DockerBuilder: