summaryrefslogtreecommitdiffstats
path: root/compass-tasks-k8s/arm64/docker-pkg.patch
blob: 11e3ffc4ea685e20d7a7bb21fa15be2d1c587725 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
From cf5025dcea741a8491fc7bf219cc2ca29fcac29d Mon Sep 17 00:00:00 2001
From: Yibo Cai <yibo.cai@linaro.org>
Date: Thu, 19 Apr 2018 15:45:20 +0800
Subject: [PATCH] fixup docker package

---
 roles/docker/tasks/systemd.yml                       | 8 ++++++++
 roles/docker/templates/docker-options-centos.conf.j2 | 8 ++++++++
 roles/docker/vars/debian.yml                         | 8 +++++++-
 roles/docker/vars/redhat.yml                         | 7 ++++++-
 roles/docker/vars/ubuntu.yml                         | 8 +++++++-
 5 files changed, 36 insertions(+), 3 deletions(-)
 create mode 100644 roles/docker/templates/docker-options-centos.conf.j2

diff --git a/roles/docker/tasks/systemd.yml b/roles/docker/tasks/systemd.yml
index 90425fe..0953777 100644
--- a/roles/docker/tasks/systemd.yml
+++ b/roles/docker/tasks/systemd.yml
@@ -30,6 +30,14 @@
     src: docker-options.conf.j2
     dest: "/etc/systemd/system/docker.service.d/docker-options.conf"
   notify: restart docker
+  when: ansible_distribution != 'CentOS'
+
+- name: Write docker options systemd drop-in for CentOS7
+  template:
+    src: docker-options-centos.conf.j2
+    dest: "/etc/systemd/system/docker.service.d/docker-options.conf"
+  notify: restart docker
+  when: ansible_distribution == 'CentOS'

 - name: Write docker dns systemd drop-in
   template:
diff --git a/roles/docker/templates/docker-options-centos.conf.j2 b/roles/docker/templates/docker-options-centos.conf.j2
new file mode 100644
index 0000000..829134e
--- /dev/null
+++ b/roles/docker/templates/docker-options-centos.conf.j2
@@ -0,0 +1,8 @@
+[Service]
+Environment="DOCKER_OPTS={{ docker_options | default('') }} \
+--add-runtime docker-runc=/usr/libexec/docker/docker-runc-current \
+--default-runtime=docker-runc \
+--exec-opt native.cgroupdriver=systemd \
+--userland-proxy-path=/usr/libexec/docker/docker-proxy-current \
+--signature-verification=false \
+--iptables=false"
diff --git a/roles/docker/vars/debian.yml b/roles/docker/vars/debian.yml
index 587e910..05d69fe 100644
--- a/roles/docker/vars/debian.yml
+++ b/roles/docker/vars/debian.yml
@@ -11,10 +11,16 @@ docker_versioned_pkg:
   'stable': docker-engine=17.03.1~ce-0~debian-{{ ansible_distribution_release|lower }}
   'edge': docker-engine=17.05.0~ce-0~debian-{{ ansible_distribution_release|lower }}

+#docker_package_info:
+#  pkg_mgr: apt
+#  pkgs:
+#    - name: "{{ docker_versioned_pkg[docker_version | string] }}"
+#      force: yes
+
 docker_package_info:
   pkg_mgr: apt
   pkgs:
-    - name: "{{ docker_versioned_pkg[docker_version | string] }}"
+    - name: docker.io
       force: yes

 docker_repo_key_info:
diff --git a/roles/docker/vars/redhat.yml b/roles/docker/vars/redhat.yml
index 23c5419..42ab2a4 100644
--- a/roles/docker/vars/redhat.yml
+++ b/roles/docker/vars/redhat.yml
@@ -15,10 +15,15 @@ docker_versioned_pkg:
 # https://docs.docker.com/engine/installation/linux/centos/#install-from-a-package
 # https://download.docker.com/linux/centos/7/x86_64/stable/Packages/

+#docker_package_info:
+#  pkg_mgr: yum
+#  pkgs:
+#    - name: "{{ docker_versioned_pkg[docker_version | string] }}"
+
 docker_package_info:
   pkg_mgr: yum
   pkgs:
-    - name: "{{ docker_versioned_pkg[docker_version | string] }}"
+    - name: docker

 docker_repo_key_info:
   pkg_key: ''
diff --git a/roles/docker/vars/ubuntu.yml b/roles/docker/vars/ubuntu.yml
index f11f5bb..5992f8a 100644
--- a/roles/docker/vars/ubuntu.yml
+++ b/roles/docker/vars/ubuntu.yml
@@ -11,10 +11,16 @@ docker_versioned_pkg:
   'stable': docker-engine=17.03.1~ce-0~ubuntu-{{ ansible_distribution_release|lower }}
   'edge': docker-engine=17.05.0~ce-0~ubuntu-{{ ansible_distribution_release|lower }}

+#docker_package_info:
+#  pkg_mgr: apt
+#  pkgs:
+#    - name: "{{ docker_versioned_pkg[docker_version | string] }}"
+#      force: yes
+
 docker_package_info:
   pkg_mgr: apt
   pkgs:
-    - name: "{{ docker_versioned_pkg[docker_version | string] }}"
+    - name: docker.io
       force: yes

 docker_repo_key_info:
--
2.7.4