Skip to content

Commit c6ee1bb

Browse files
authored
Merge pull request #20926 from sftim/20200512_work_around_formatting_tabs_shortcode_container_runtimes
Work around tab / codelang formatting issues in “Container runtimes” page
2 parents affb6b2 + f49cb16 commit c6ee1bb

File tree

1 file changed

+106
-32
lines changed

1 file changed

+106
-32
lines changed

content/en/docs/setup/production-environment/container-runtimes.md

Lines changed: 106 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ A flaw was found in the way runc handled system file descriptors when running co
2121
A malicious container could use this flaw to overwrite contents of the runc binary and
2222
consequently run arbitrary commands on the container host system.
2323

24-
Please refer to this link for more information about this issue
25-
[cve-2019-5736 : runc vulnerability ] (https://access.redhat.com/security/cve/cve-2019-5736)
24+
Please refer to [CVE-2019-5736](https://access.redhat.com/security/cve/cve-2019-5736) for more
25+
information about the issue.
2626
{{< /caution >}}
2727

2828
### Applicability
@@ -70,29 +70,39 @@ Keep track of the latest verified Docker version in the Kubernetes release notes
7070
Use the following commands to install Docker on your system:
7171

7272
{{< tabs name="tab-cri-docker-installation" >}}
73-
{{< tab name="Ubuntu 16.04+" codelang="bash" >}}
74-
# Install Docker CE
73+
{{< tab name="Ubuntu 16.04+" >}}
74+
75+
```shell
76+
# (Install Docker CE)
7577
## Set up the repository:
7678
### Install packages to allow apt to use a repository over HTTPS
7779
apt-get update && apt-get install -y \
7880
apt-transport-https ca-certificates curl software-properties-common gnupg2
81+
```
7982

80-
### Add Docker’s official GPG key
83+
```shell
84+
# Add Docker’s official GPG key:
8185
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
86+
```
8287

83-
### Add Docker apt repository.
88+
```shell
89+
# Add the Docker apt repository:
8490
add-apt-repository \
8591
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
8692
$(lsb_release -cs) \
8793
stable"
94+
```
8895

89-
## Install Docker CE.
96+
```shell
97+
# Install Docker CE
9098
apt-get update && apt-get install -y \
9199
containerd.io=1.2.13-1 \
92100
docker-ce=5:19.03.8~3-0~ubuntu-$(lsb_release -cs) \
93101
docker-ce-cli=5:19.03.8~3-0~ubuntu-$(lsb_release -cs)
102+
```
94103

95-
# Setup daemon.
104+
```shell
105+
# Set up the Docker daemon
96106
cat > /etc/docker/daemon.json <<EOF
97107
{
98108
"exec-opts": ["native.cgroupdriver=systemd"],
@@ -103,34 +113,48 @@ cat > /etc/docker/daemon.json <<EOF
103113
"storage-driver": "overlay2"
104114
}
105115
EOF
116+
```
106117

118+
```shell
107119
mkdir -p /etc/systemd/system/docker.service.d
120+
```
108121

109-
# Restart docker.
122+
```shell
123+
# Restart Docker
110124
systemctl daemon-reload
111125
systemctl restart docker
126+
```
112127
{{< /tab >}}
113-
{{< tab name="CentOS/RHEL 7.4+" codelang="bash" >}}
128+
{{< tab name="CentOS/RHEL 7.4+" >}}
114129

115-
# Install Docker CE
130+
```shell
131+
# (Install Docker CE)
116132
## Set up the repository
117-
### Install required packages.
133+
### Install required packages
118134
yum install -y yum-utils device-mapper-persistent-data lvm2
135+
```
119136

120-
### Add Docker repository.
137+
```shell
138+
## Add the Docker repository
121139
yum-config-manager --add-repo \
122140
https://download.docker.com/linux/centos/docker-ce.repo
141+
```
123142

124-
## Install Docker CE.
143+
```shell
144+
# Install Docker CE
125145
yum update -y && yum install -y \
126146
containerd.io-1.2.13 \
127147
docker-ce-19.03.8 \
128148
docker-ce-cli-19.03.8
149+
```
129150

130-
## Create /etc/docker directory.
151+
```shell
152+
## Create /etc/docker
131153
mkdir /etc/docker
154+
```
132155

133-
# Setup daemon.
156+
```shell
157+
# Set up the Docker daemon
134158
cat > /etc/docker/daemon.json <<EOF
135159
{
136160
"exec-opts": ["native.cgroupdriver=systemd"],
@@ -144,12 +168,17 @@ cat > /etc/docker/daemon.json <<EOF
144168
]
145169
}
146170
EOF
171+
```
147172

173+
```shell
148174
mkdir -p /etc/systemd/system/docker.service.d
175+
```
149176

177+
```shell
150178
# Restart Docker
151179
systemctl daemon-reload
152180
systemctl restart docker
181+
```
153182
{{< /tab >}}
154183
{{< /tabs >}}
155184

@@ -173,7 +202,7 @@ For more information, see the [CRI-O compatiblity matrix](https://github.com/cri
173202
modprobe overlay
174203
modprobe br_netfilter
175204

176-
# Setup required sysctl params, these persist across reboots.
205+
# Set up required sysctl params, these persist across reboots.
177206
cat > /etc/sysctl.d/99-kubernetes-cri.conf <<EOF
178207
net.bridge.bridge-nf-call-iptables = 1
179208
net.ipv4.ip_forward = 1
@@ -184,55 +213,79 @@ sysctl --system
184213
```
185214

186215
{{< tabs name="tab-cri-cri-o-installation" >}}
187-
{{< tab name="Debian" codelang="bash" >}}
216+
{{< tab name="Debian" >}}
217+
218+
```shell
188219
# Debian Unstable/Sid
189220
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Unstable/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
190221
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_Unstable/Release.key -O- | sudo apt-key add -
222+
```
191223

224+
```shell
192225
# Debian Testing
193226
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Testing/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
194227
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_Testing/Release.key -O- | sudo apt-key add -
228+
```
195229

230+
```shell
196231
# Debian 10
197232
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
198233
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_10/Release.key -O- | sudo apt-key add -
234+
```
199235

236+
```shell
200237
# Raspbian 10
201238
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Raspbian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
202239
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Raspbian_10/Release.key -O- | sudo apt-key add -
240+
```
203241

204-
# Install CRI-O
242+
and then install CRI-O:
243+
```shell
205244
sudo apt-get install cri-o-1.17
245+
```
206246
{{< /tab >}}
207247

208-
{{< tab name="Ubuntu 18.04, 19.04 and 19.10" codelang="bash" >}}
209-
# Setup repository
248+
{{< tab name="Ubuntu 18.04, 19.04 and 19.10" >}}
249+
250+
```shell
251+
# Configure package repository
210252
. /etc/os-release
211253
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
212254
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O- | sudo apt-key add -
213255
sudo apt-get update
256+
```
214257

258+
```shell
215259
# Install CRI-O
216260
sudo apt-get install cri-o-1.17
261+
```
217262
{{< /tab >}}
218263

219-
{{< tab name="CentOS/RHEL 7.4+" codelang="bash" >}}
264+
{{< tab name="CentOS/RHEL 7.4+" >}}
265+
266+
```shell
220267
# Install prerequisites
221268
curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/CentOS_7/devel:kubic:libcontainers:stable.repo
222269
curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:{{< skew latestVersion >}}.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:{{< skew latestVersion >}}/CentOS_7/devel:kubic:libcontainers:stable:cri-o:{{< skew latestVersion >}}.repo
270+
```
223271

272+
```shell
224273
# Install CRI-O
225274
yum install -y cri-o
275+
```
226276
{{< /tab >}}
227277

228-
{{< tab name="openSUSE Tumbleweed" codelang="bash" >}}
278+
{{< tab name="openSUSE Tumbleweed" >}}
279+
280+
```shell
229281
sudo zypper install cri-o
282+
```
230283
{{< /tab >}}
231284
{{< /tabs >}}
232285

233286
### Start CRI-O
234287

235-
```
288+
```shell
236289
systemctl daemon-reload
237290
systemctl start crio
238291
```
@@ -270,51 +323,72 @@ sysctl --system
270323
### Install containerd
271324

272325
{{< tabs name="tab-cri-containerd-installation" >}}
273-
{{< tab name="Ubuntu 16.04" codelang="bash" >}}
274-
# Install containerd
326+
{{< tab name="Ubuntu 16.04" >}}
327+
328+
```shell
329+
# (Install containerd)
275330
## Set up the repository
276331
### Install packages to allow apt to use a repository over HTTPS
277332
apt-get update && apt-get install -y apt-transport-https ca-certificates curl software-properties-common
333+
```
278334

279-
### Add Docker’s official GPG key
335+
```shell
336+
## Add Docker’s official GPG key
280337
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
338+
```
281339

282-
### Add Docker apt repository.
340+
```shell
341+
## Add Docker apt repository.
283342
add-apt-repository \
284343
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
285344
$(lsb_release -cs) \
286345
stable"
346+
```
287347

348+
```shell
288349
## Install containerd
289350
apt-get update && apt-get install -y containerd.io
351+
```
290352

353+
```shell
291354
# Configure containerd
292355
mkdir -p /etc/containerd
293356
containerd config default > /etc/containerd/config.toml
357+
```
294358

359+
```shell
295360
# Restart containerd
296361
systemctl restart containerd
362+
```
297363
{{< /tab >}}
298-
{{< tab name="CentOS/RHEL 7.4+" codelang="bash" >}}
299-
# Install containerd
364+
{{< tab name="CentOS/RHEL 7.4+" >}}
365+
366+
```shell
367+
# (Install containerd)
300368
## Set up the repository
301369
### Install required packages
302370
yum install -y yum-utils device-mapper-persistent-data lvm2
303371

304-
### Add docker repository
372+
```shell
373+
## Add docker repository
305374
yum-config-manager \
306375
--add-repo \
307376
https://download.docker.com/linux/centos/docker-ce.repo
308377
378+
```shell
309379
## Install containerd
310380
yum update -y && yum install -y containerd.io
311381

312-
# Configure containerd
382+
```shell
383+
## Configure containerd
313384
mkdir -p /etc/containerd
314385
containerd config default > /etc/containerd/config.toml
386+
```
315387

388+
```shell
316389
# Restart containerd
317390
systemctl restart containerd
391+
```
318392
{{< /tab >}}
319393
{{< /tabs >}}
320394

0 commit comments

Comments
 (0)