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
This commit is contained in:
parent
c97d928215
commit
738ab37716
2 changed files with 24 additions and 3 deletions
|
@ -36,6 +36,11 @@ nextcloud_customized_container_src_path: "{{ nextcloud_base_path }}/customized-c
|
||||||
nextcloud_container_image_customizations_php_imageick_installation_enabled: false
|
nextcloud_container_image_customizations_php_imageick_installation_enabled: false
|
||||||
nextcloud_container_image_customizations_php_imageick_installation_package: "libmagickcore-6.q16-6-extra"
|
nextcloud_container_image_customizations_php_imageick_installation_package: "libmagickcore-6.q16-6-extra"
|
||||||
|
|
||||||
|
# Samba (SMB) support for Windows fileshares can be setup using the toggle below, which
|
||||||
|
# installs the smbclient package per the example here https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/smb/apache/Dockerfile
|
||||||
|
# Also see ../../templates/customizations/Dockerfile.j2
|
||||||
|
nextcloud_container_image_customizations_samba_enabled: false
|
||||||
|
|
||||||
# Preview generator setup
|
# Preview generator setup
|
||||||
#
|
#
|
||||||
# Enable the variable nextcloud_preview_enabled and you are good to go.
|
# Enable the variable nextcloud_preview_enabled and you are good to go.
|
||||||
|
@ -90,7 +95,14 @@ nextcloud_preview_app_jpeg_quality: "60"
|
||||||
# - `nextcloud_container_image_customizations_dockerfile_body_custom`
|
# - `nextcloud_container_image_customizations_dockerfile_body_custom`
|
||||||
# - `nextcloud_container_image_customized`
|
# - `nextcloud_container_image_customized`
|
||||||
# - `nextcloud_container_image_final`
|
# - `nextcloud_container_image_final`
|
||||||
nextcloud_container_image_customizations_enabled: "{{ nextcloud_container_image_customizations_php_imageick_installation_enabled }}"
|
nextcloud_container_image_customizations_enabled: |
|
||||||
|
{{
|
||||||
|
(
|
||||||
|
nextcloud_container_image_customizations_php_imageick_installation_enabled
|
||||||
|
or
|
||||||
|
nextcloud_container_image_customizations_samba_enabled
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
|
||||||
# nextcloud_container_image_customizations_dockerfile_body_custom contains your custom Dockerfile steps
|
# nextcloud_container_image_customizations_dockerfile_body_custom contains your custom Dockerfile steps
|
||||||
# for building your customized Nextcloud image based on the original (upstream) image (`nextcloud_container_image`).
|
# for building your customized Nextcloud image based on the original (upstream) image (`nextcloud_container_image`).
|
||||||
|
|
|
@ -1,8 +1,17 @@
|
||||||
FROM {{ nextcloud_container_image }}
|
FROM {{ nextcloud_container_image }}
|
||||||
|
|
||||||
|
{% set packages_to_install = [] %}
|
||||||
|
|
||||||
{% if nextcloud_container_image_customizations_php_imageick_installation_enabled %}
|
{% if nextcloud_container_image_customizations_php_imageick_installation_enabled %}
|
||||||
RUN apt -y update
|
{% set packages_to_install = packages_to_install + [nextcloud_container_image_customizations_php_imageick_installation_package] %}
|
||||||
RUN apt -y 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 %}
|
{% endif %}
|
||||||
|
|
||||||
{{ nextcloud_container_image_customizations_dockerfile_body_custom }}
|
{{ nextcloud_container_image_customizations_dockerfile_body_custom }}
|
||||||
|
|
Loading…
Reference in a new issue