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>
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>
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>
Use ",".join() instead of the custom join() method and fix
Secret.command() by checking if secret_type and not target is mount...
Signed-off-by: Enno Tensing <tenno@suij.in>
This fixes various issues reported by pylint. It now only reports to
issues, that can be ignored, since they're only about too many local
variables or class attributes.
Signed-off-by: Enno Tensing <tenno@suij.in>
Since the environemt creation are now seperate methods, the create and
create_container split is no longer needed.
Signed-off-by: Enno Tensing <tenno@suij.in>
Add {create,remove}_environment wrappers to the Container class, so that
the generate script can access them.
Signed-off-by: Enno Tensing <tenno@suij.in>
Remove the if ! [ -d {file.parent} ] check from Envrionment.create(), as
the directory has to exists, since the script checking if it exists also
is located in that directort...
Signed-off-by: Enno Tensing <tenno@suij.in>