diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-10-10 20:56:49 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-10-10 20:56:49 +0200 |
commit | 3359f912f005168e0d624b42540c231c5c538c2d (patch) | |
tree | 8e71ffa72cda20d4140198cd4a8108fc09b8ede1 /roles/apps/nextcloud/tasks/custom-image.yml | |
parent | no more flush-handlers for apt-repos (diff) |
nextcloud: add app user to custom images
Diffstat (limited to 'roles/apps/nextcloud/tasks/custom-image.yml')
-rw-r--r-- | roles/apps/nextcloud/tasks/custom-image.yml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/roles/apps/nextcloud/tasks/custom-image.yml b/roles/apps/nextcloud/tasks/custom-image.yml index 6702d70b..5aac75e0 100644 --- a/roles/apps/nextcloud/tasks/custom-image.yml +++ b/roles/apps/nextcloud/tasks/custom-image.yml @@ -8,7 +8,14 @@ copy: content: | FROM {{ item.value.custom_image.from | default('nextcloud:' + item.value.version) }} + + RUN set -x \ + && addgroup --gid {{ nextcloud_app_gid }} nc-app \ + && adduser --uid {{ nextcloud_app_uid }} --gid {{ nextcloud_app_gid }} --system --no-create-home --home /var/www/html --disabled-login --disabled-password nc-app + {% if 'custom_image' in item.value %} + {{ item.value.custom_image.dockerfile }} + {% endif %} dest: "{{ nextcloud_base_path }}/{{ item.key }}/build/Dockerfile" register: nextcloud_custom_image_docker |