File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,7 @@ This will create:
3939
4040* `container_image` (**required**) - Docker image the service uses
4141* `container_args` - arbitrary list of arguments to the `docker run` command as a string
42- * `container_cmd` - optional command to the container run command (the part after the
43- image name)
42+ * `container_cmd` (default: _[]_) - optional list of commands to the container run command (the part after the image name)
4443* `container_env` - key/value pairs of ENV vars that need to be present
4544* `container_volumes` (default: _[]_) - List of `-v` arguments
4645* `container_host_network` (default: _false_) - Whether the host network should be used
Original file line number Diff line number Diff line change 22container_name : " {{ name }}"
33container_docker_pull : true
44container_labels : []
5+ container_cmd : []
56container_host_network : false
67container_network : " "
78container_links : []
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ ExecStart={{ docker_path }} run \
3535 {{ params('--device', container_devices) }}\
3636 {% if container_privileged == true %} --privileged{% endif %} \
3737 {{ container_args | trim }} \
38- {{ container_image }} {{ container_cmd | default(' ') | trim }}
38+ {{ container_image }} {% if container_cmd is string %} {{ container_cmd | trim }} {% else %} {{ container_cmd | join(' ') | trim }} {% endif % }
3939{% endif %}
4040{% if not 'ExecStop' in service_systemd_options_keys %}
4141ExecStop={{ docker_path }} stop {{ container_name }}
You can’t perform that action at this time.
0 commit comments