Get timezone from the container config and fall back to local, which
uses the hosts timezone, if the config entry is missing or not a string.
Signed-off-by: Enno Tensing <tenno@suij.in>
From podman-create(1):
If a volume source is specified, it must be a path on the host or the
name of a named volume. Host paths are allowed to be absolute or relative;
relative paths are resolved relative to the directory Podman is run in.
If the source does not exist, Podman returns an error. Users must pre-create
the source files or directories. Any source that does not begin with
a . or / is treated as the name of a named volume.
Implement this with the is_host_volume() check.
Signed-off-by: Enno Tensing <tenno@suij.in>
Volumes can be mounted with some different flags or no flags at all.
Since converting the string into an object would be overkill, as most of
the time the default options should suffice, and branching in
Volumes.from_json() to handle both strings and objects is also no the
cleanest method, implement it by using what already exists. Mount points
are not checked by the script, so the mount options can just be added to
the CONTAINER-DIR part of the volume config.
Signed-off-by: Enno Tensing <tenno@suij.in>
Add a header stating that the script was generated, which version
generated it and where to send bug reports.
Signed-off-by: Enno Tensing <tenno@suij.in>
When a given control script is empty, because the current config is
missing a value for said script or is malformed, a script with only
the shebang was written. Change it, so that it now executes true.
Signed-off-by: Enno Tensing <tenno@suij.in>
A container can be created from a name and an image, no other part is
required. Reflect that in the JSON schema, by removing most top-level
required entries. Also remove the hardcoded env-vars from the schema.
Signed-off-by: Enno Tensing <tenno@suij.in>
Add a json-schema generated by www.liquid-technologies.com/online-json-to-schema-converter
modified to remove hard-coded values from the example conifg (like
MySecret1).
Signed-off-by: Enno Tensing <tenno@suij.in>
When creating the env-vars printf is called with arguments in single
quotes to prevent variable and sub-shell expansions. However, only one
single quote was passed as an argument to printf, but two format
specifiers are present in the escpaed string.
Fix this by adding another \"'\" to the variable cmd.
Signed-off-by: Enno Tensing <tenno@suij.in>
As ${TODAY} was forgotten, the first argument from ${@} was used as a
timestamp instead, resulting in malformed log messages. Fix this by
adding ${TDOAY} before ${@}.
Signed-off-by: Enno Tensing <tenno@suij.in>