1
0
Fork 0
mash-ansible-role-nextcloud/templates/customizations/Dockerfile.j2
brush 738ab37716
add samba customization to dockerfile, if nextcloud_container_image_customizations_samba_enabled: true (#12)
* Update main.yml

set container customizations to enabled if nextcloud_container_image_smb_enabled is set (OR imagemagick)

* nextcloud_container_image_customizations_smb_enabled activates customizations

* add smbclient installation to docker image, if enabled

see https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/smb/apache/Dockerfile for source

* Set variable default and revise multiline syntax

Integrate suggestions from @spantaleev

* Refactor code to make only a single, one-line package install

Per suggestion @spanteleev;  so that extra files can be deleted without leaving a footprint in the stack of images
2023-12-03 12:25:26 +02:00

17 lines
867 B
Django/Jinja

FROM {{ nextcloud_container_image }}
{% set packages_to_install = [] %}
{% if nextcloud_container_image_customizations_php_imageick_installation_enabled %}
{% set packages_to_install = packages_to_install + [nextcloud_container_image_customizations_php_imageick_installation_package] %}
{% endif %}
{% if nextcloud_container_image_customizations_samba_enabled %}
{% set packages_to_install = packages_to_install + ['procps', 'smbclient'] %}
{% endif %}
{% if packages_to_install | length > 0 %}
RUN apt -y update && apt -y install {{ packages_to_install | join(' ') }} && rm -rf /var/lib/apt/lists/*
{% endif %}
{{ nextcloud_container_image_customizations_dockerfile_body_custom }}