fix(element): user id and primary group id, start containers with uid=0

This commit is contained in:
transcaffeine 2024-11-12 20:47:58 +01:00
parent 3ac177e04b
commit be6f7c1cc2
Signed by: transcaffeine
GPG Key ID: 03624C433676E465
3 changed files with 6 additions and 6 deletions

View File

@ -10,9 +10,9 @@ element_dist_path: "{{ element_source_path }}/dist"
element_config_path: "{{ element_base_path }}/config" element_config_path: "{{ element_base_path }}/config"
element_config_file: "{{ element_config_path }}/config.json" element_config_file: "{{ element_config_path }}/config.json"
element_host_uid: >- element_host_uid: >-2
{{ element_user_info is defined {{ ((element_user_info is defined) and ('uid' in element_user_info))
| ternary(element_user_info.uid, element_user) }} | ternary(element_user_info.uid, element_user) }}
element_host_gid: >- element_host_gid: >-2
{{ element_user_info is defined {{ ((element_user_info is defined) and ('uid' in element_user_info))
| ternary(element_user_info.group, element_user) }} | ternary(element_user_info.group, element_user) }}

View File

@ -23,7 +23,7 @@
image: "{{ element_container_image }}" image: "{{ element_container_image }}"
state: "{{ (element_state == 'present') | ternary('started', 'absent') }}" state: "{{ (element_state == 'present') | ternary('started', 'absent') }}"
env: "{{ element_container_env | default(omit) }}" env: "{{ element_container_env | default(omit) }}"
user: "{{ element_container_user }}" user: "{{ element_container_user | default(omit) }}"
ports: "{{ element_container_ports | default(omit) }}" ports: "{{ element_container_ports | default(omit) }}"
labels: "{{ element_container_labels | default(omit) }}" labels: "{{ element_container_labels | default(omit) }}"
volumes: "{{ element_container_full_volumes }}" volumes: "{{ element_container_full_volumes }}"

View File

@ -12,7 +12,7 @@
image: "{{ element_container_image }}" image: "{{ element_container_image }}"
state: "{{ (element_state == 'present') | ternary('started', 'absent') }}" state: "{{ (element_state == 'present') | ternary('started', 'absent') }}"
env: "{{ element_container_env | default(omit) }}" env: "{{ element_container_env | default(omit) }}"
user: "{{ element_container_user }}" user: "{{ element_container_user | default(omit) }}"
ports: "{{ element_container_ports | default(omit) }}" ports: "{{ element_container_ports | default(omit) }}"
labels: "{{ element_container_labels | default(omit) }}" labels: "{{ element_container_labels | default(omit) }}"
volumes: "{{ element_container_full_volumes }}" volumes: "{{ element_container_full_volumes }}"