diff options
Diffstat (limited to 'roles/apps/collabora/code/instance/tasks/custom-image.yml')
-rw-r--r-- | roles/apps/collabora/code/instance/tasks/custom-image.yml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/roles/apps/collabora/code/instance/tasks/custom-image.yml b/roles/apps/collabora/code/instance/tasks/custom-image.yml new file mode 100644 index 00000000..212fff36 --- /dev/null +++ b/roles/apps/collabora/code/instance/tasks/custom-image.yml @@ -0,0 +1,24 @@ +--- +- name: create build directory for custom image + file: + path: "{{ collabora_code_instance_basepath }}/build" + state: directory + +- name: generate Dockerfile for custom image + copy: + content: | + FROM {{ collabora_code_instances[collabora_code_instance].custom_image.from | default('collabora/code:' + collabora_code_instances[collabora_code_instance].version) }} + {{ collabora_code_instances[collabora_code_instance].custom_image.dockerfile }} + dest: "{{ collabora_code_instance_basepath }}/build/Dockerfile" + register: collabora_code_custom_image_docker + +- name: build custom image + docker_image: + name: "collabora/code/{{ collabora_code_instance }}:{{ collabora_code_instances[collabora_code_instance].version }}" + state: present + force_source: "{{ collabora_code_custom_image_docker is changed }}" + source: build + build: + path: "{{ collabora_code_instance_basepath }}/build" + network: host + pull: yes |