Add workdir to distoless.toml format

This commit is contained in:
Mikhail Gordeev 2023-02-10 15:59:54 +03:00
parent 3dd93ea596
commit edf94c9db8

View File

@ -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: