diff --git a/generate/container.py b/generate/container.py index c8e19f9..a1890aa 100644 --- a/generate/container.py +++ b/generate/container.py @@ -506,6 +506,7 @@ class Image: registry: str image: str tag: str + cmd: str @classmethod def from_json(cls, val: ConfigValue, logger: Log) -> Self | None: @@ -516,10 +517,13 @@ class Image: registry = maybe_or(val, "registry", "") image = maybe_or(val, "image", "") tag = maybe_or(val, "tag", "") - return cls(str(registry), str(image), str(tag)) + cmd = maybe_or(val, "command", "") + return cls(str(registry), str(image), str(tag), cmd) def command(self) -> str: """Option for podman container create.""" + if self.cmd != "": + return f"{self.registry}/{self.image}:{self.tag} {self.cmd}" return f"{self.registry}/{self.image}:{self.tag}"