Skip to content

Commit

Permalink
docker: use nonroot image provided by OpenKM
Browse files Browse the repository at this point in the history
Since the original image misuses `VOLUME` directive and makes it
impossible t actually change permissions for `/opt/tomcat`:
openkm/document-management-system#364
https://support.openkm.com/tickets.php?id=13006

Signed-off-by: Jakub Sokołowski <jakub@status.im>
  • Loading branch information
jakubgs committed Dec 4, 2023
1 parent 02e184d commit c696ba6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ openkm_docker_registry_url: 'https://docker.openkm.com/'
# App
openkm_app_cont_name: '{{ openkm_service_name }}-app'
openkm_app_cont_vol: '{{ openkm_service_path }}/app'
openkm_app_cont_tag: '8.1.5'
openkm_app_cont_tag: '8.1.5-nonroot'
openkm_app_cont_image: 'docker.openkm.com/private/professional:{{ openkm_app_cont_tag }}'
openkm_app_cont_port: 8080
openkm_app_cont_uid: 33
openkm_app_cont_uid: 1000
# Xvfb
openkm_xvfb_cont_name: '{{ openkm_service_name }}-xvfb'
openkm_xvfb_cont_vol: '{{ openkm_service_path }}/xvfb'
Expand Down
8 changes: 0 additions & 8 deletions tasks/docker.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
---
- name: Create app Dockerfile
template:
src: 'Dockerfile.j2'
dest: '{{ openkm_app_cont_vol }}/docker/Dockerfile'
owner: 'dockremap'
group: 'docker'
mode: 0640

- name: Create compose file
template:
src: 'docker-compose.yml.j2'
Expand Down
4 changes: 0 additions & 4 deletions templates/Dockerfile.j2

This file was deleted.

6 changes: 3 additions & 3 deletions templates/docker-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ version: '3.7'
services:
app:
container_name: '{{ openkm_app_cont_name }}'
build: '{{ openkm_app_cont_vol }}/docker'
user: 'www-data'
image: '{{ openkm_app_cont_image }}'
user: 'openkm'
network_mode: 'host'
restart: 'always'
stop_signal: SIGINT
Expand All @@ -26,7 +26,7 @@ services:
xvfb:
container_name: '{{ openkm_xvfb_cont_name }}'
image: '{{ openkm_xvfb_cont_image }}'
user: 'www-data'
user: 'openkm'
restart: 'always'
entrypoint: '/usr/bin/Xvfb'
command: ':1'
Expand Down

0 comments on commit c696ba6

Please sign in to comment.