add options to auto-enable userns-remap
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
Robert Kaussow 2023-02-18 15:08:12 +01:00
parent c7477abeff
commit 8712f4307f
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
4 changed files with 10 additions and 6 deletions

View File

@ -49,9 +49,9 @@
state: directory
mode: "{{ item.mode }}"
- name: Write service override
- name: Write service override.conf
template:
src: etc/systemd/system/docker.service.d/override.j2
src: etc/systemd/system/docker.service.d/override.conf.j2
dest: /etc/systemd/system/docker.service.d/override.conf
mode: 0644
notify: __docker_restart

View File

@ -1,4 +1,6 @@
{{ ansible_managed | comment }}
OPTIONS='{{' --userns-remap=' + dockerengine_nsremap_user + ':' + dockerengine_nsremap_user if dockerengine_usernamespace_enabled | bool else '' }}'
# Proxy settings
{% if dockerengine_http_proxy is defined %}
HTTP_PROXY={{ dockerengine_http_proxy }}

View File

@ -0,0 +1,6 @@
[Service]
EnvironmentFile=-/etc/sysconfig/docker
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// \
--containerd=/run/containerd/containerd.sock \
$OPTIONS

View File

@ -1,4 +0,0 @@
[Service]
EnvironmentFile=-/etc/sysconfig/docker
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock