Skip to content

Commit 41c9a9e

Browse files
authored
Update kata-container.md
1 parent 7fa1b18 commit 41c9a9e

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

content/docs/containerD/kata-container.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,3 +221,45 @@ sangam@sangam:~$ sudo ctr run --cni --runtime io.containerd.run.kata.v2 -t --rm
221221
222222
```
223223

224+
225+
226+
### Configure with Docker
227+
```
228+
sam@sam:~$ cat <<EOF | sudo tee "/usr/bin/containerd-shim-kata_$(echo "$VERSION" | sed 's/\./_/g')-v2" > /dev/null
229+
#!/bin/sh
230+
export KATA_CONF_FILE="$DIR/share/defaults/kata-containers/configuration.toml"
231+
export PATH="$DIR/bin:\$PATH"
232+
exec $DIR/bin/containerd-shim-kata-v2 "\$@"
233+
EOF
234+
235+
sudo chmod +x "/usr/bin/containerd-shim-kata_$(echo "$VERSION" | sed 's/\./_/g')-v2"
236+
[sudo] password for sam:
237+
sam@sam:~$ cat <<EOF | sudo tee "/usr/bin/kata-runtime-$VERSION" > /dev/null
238+
#!/bin/sh
239+
export KATA_CONF_FILE="$DIR/share/defaults/kata-containers/configuration.toml"
240+
export PATH="$DIR/bin:\$PATH"
241+
exec $DIR/bin/kata-runtime "\$@"
242+
EOF
243+
244+
sudo chmod +x "/usr/bin/kata-runtime-$VERSION"
245+
sam@sam:~$ echo "io.containerd.run.kata_$(echo "$VERSION" | sed 's/\./_/g').v2"
246+
io.containerd.run.kata_.v2
247+
sam@sam:~$ sudo docker run -d --name nginx nginx
248+
Unable to find image 'nginx:latest' locally
249+
latest: Pulling from library/nginx
250+
7ce705000c39: Pull complete
251+
b3e9225c8fca: Pull complete
252+
2b39a3d0829e: Pull complete
253+
6d24e34787c7: Pull complete
254+
066d623ff8e6: Pull complete
255+
49486a4a61a6: Pull complete
256+
34d83bb3522a: Pull complete
257+
Digest: sha256:0a399eb16751829e1af26fea27b20c3ec28d7ab1fb72182879dcae1cca21206a
258+
Status: Downloaded newer image for nginx:latest
259+
421ac9fbcf95ed8360f4b76fe230effd619ce993c64d9f3d7e5dfd248f655689
260+
261+
```
262+
263+
264+
265+

0 commit comments

Comments
 (0)