Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.18 KB

example-command.md

File metadata and controls

30 lines (24 loc) · 1.18 KB

Example command

The following containerd command creates a container. It is referred to throughout the architecture document to help explain various points:

$ sudo ctr run --runtime "io.containerd.kata.v2" --rm -t "quay.io/libpod/ubuntu:latest" foo sh

This command requests that containerd:

  • Create a container (ctr run).

  • Use the Kata shimv2 runtime (--runtime "io.containerd.kata.v2").

  • Delete the container when it exits (--rm).

  • Attach the container to the user's terminal (-t).

  • Use the Ubuntu Linux container image to create the container rootfs that will become the container environment (quay.io/libpod/ubuntu:latest).

  • Create the container with the name "foo".

  • Run the sh(1) command in the Ubuntu rootfs based container environment.

    The command specified here is referred to as the workload.

Note:

For the purposes of this document and to keep explanations simpler, we assume the user is running this command in the host environment.