CONTAINERD-CTR(8)

๐Ÿ“ฆ
version 1.7.33 ยท 4 versions
, in opensuse-leap 16.0

๐Ÿ’… ctr(8) โ€” the containerd command, but make it a group chat

okay so real talk first, bestie: ctr is an unsupported debug and administrative client for interacting with the containerd daemon. and because it's unsupported, the commands, the options and the operations are not guaranteed to be backward compatible or stable from release to release of the containerd project. likeโ€ฆ no cap, no promises, the vibes shift between releases. read the flags, love the flags, don't build your whole personality on them ๐Ÿซถ


๐ŸŽ€ NAME

ctr

โœจ SYNOPSIS

ctr

       [--address|-a]=[value]
       [--connect-timeout]=[value]
       [--debug]
       [--namespace|-n]=[value]
       [--timeout]=[value]

Usage:

ctr [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...]

๐ŸŒธ GLOBAL OPTIONS

  • --address, -a="" โ€” the address for containerd's GRPC server (default: /run/containerd/containerd.sock). this is the little doorway where your client knocks ๐Ÿ’…
  • --connect-timeout="" โ€” timeout for connecting to containerd (default: 0s)
  • --debug โ€” enable debug output in logs. turn this on when you wanna see everything, main character energy
  • --namespace, -n="" โ€” namespace to use with commands (default: default). your own little bubble โœจ
  • --timeout="" โ€” total timeout for ctr commands (default: 0s)

๐Ÿ‘‘ COMMANDS

๐Ÿงฉ plugins, plugin

Provides information about containerd plugins

list, ls

Lists containerd plugins

  • --detailed, -d โ€” print detailed information about each plugin
  • --quiet, -q โ€” print only the plugin ids

โญ version

Print the client and server versions

๐Ÿ“ฆ containers, c, container

Manage containers

create

Create container

  • --allow-new-privs โ€” turn off OCI spec's NoNewPrivileges feature flag
  • --annotation="" โ€” specify additional OCI annotations (e.g. foo=bar)
  • --apparmor-default-profile="" โ€” enable AppArmor with the default profile with the specified name, e.g. "cri-containerd.apparmor.d"
  • --apparmor-profile="" โ€” enable AppArmor with an existing custom profile
  • --blockio-class="" โ€” name of the blockio class to associate the container with
  • --blockio-config-file="" โ€” file path to blockio class definitions. By default class definitions are not loaded.
  • --cap-add="" โ€” add Linux capabilities (set capabilities with 'CAP_' prefix)
  • --cap-drop="" โ€” drop Linux capabilities (set capabilities with 'CAP_' prefix)
  • --config, -c="" โ€” path to the runtime-specific spec config file
  • --cpu-period="" โ€” limit CPU CFS period (default: 0)
  • --cpu-quota="" โ€” limit CPU CFS quota (default: -1)
  • --cwd="" โ€” specify the working directory of the process
  • --device="" โ€” file path to a device to add to the container; or a path to a directory tree of devices to add to the container
  • --env="" โ€” specify additional container environment variables (e.g. FOO=bar)
  • --env-file="" โ€” specify additional container environment variables in a file (e.g. FOO=bar, one per line)
  • --gpus="" โ€” add gpus to the container ๐Ÿ”ฅ
  • --hostname="" โ€” set the container's host name
  • --label="" โ€” specify additional labels (e.g. foo=bar)
  • --memory-limit="" โ€” memory limit (in bytes) for the container (default: 0)
  • --mount="" โ€” specify additional container mount (e.g. type=bind,src=/tmp,dst=/host,options=rbind:ro)
  • --net-host โ€” enable host networking for the container
  • --no-pivot โ€” disable use of pivot-root (linux only)
  • --pid-file="" โ€” file path to write the task's pid
  • --privileged โ€” run privileged container. highkey powerful, be careful ๐Ÿซฃ
  • --rdt-class="" โ€” name of the RDT class to associate the container with. Specifies a Class of Service (CLOS) for cache and memory bandwidth management.
  • --read-only โ€” set the container's filesystem as readonly
  • --rootfs โ€” use custom rootfs that is not managed by containerd snapshotter
  • --rootfs-propagation="" โ€” set the propagation of the container rootfs
  • --runtime="" โ€” runtime name or absolute path to runtime binary (default: io.containerd.runc.v2)
  • --runtime-config-path="" โ€” optional runtime config path
  • --sandbox="" โ€” create the container in the given sandbox
  • --seccomp โ€” enable the default seccomp profile
  • --seccomp-profile="" โ€” file path to custom seccomp profile. seccomp must be set to true, before using seccomp-profile
  • --snapshotter="" โ€” snapshotter name. Empty value stands for the default value.
  • --snapshotter-label="" โ€” labels added to the new snapshot for this container.
  • --tty, -t โ€” allocate a TTY for the container
  • --user, -u="" โ€” username or user id, group optional (format: [:])
  • --with-ns="" โ€” specify existing Linux namespaces to join at container runtime (format ':')

delete, del, remove, rm

Delete one or more existing containers

  • --keep-snapshot โ€” do not clean up snapshot with container

info

Get info about a container

  • --spec โ€” only display the spec

list, ls

List containers

  • --quiet, -q โ€” print only the container id

label

Set and clear labels for a container

checkpoint

Checkpoint a container

  • --image โ€” include the image in the checkpoint
  • --rw โ€” include the rw layer in the checkpoint
  • --task โ€” checkpoint container task

restore

Restore a container from checkpoint

  • --live โ€” restore the runtime and memory data from the checkpoint
  • --rw โ€” restore the rw layer from the checkpoint

๐Ÿ—„๏ธ content

Manage content

active

Display active transfers

  • --root="" โ€” path to content store root (default: /tmp/content)
  • --timeout, -t="" โ€” total timeout for fetch (default: 0s)

delete, del, remove, rm

Permanently delete one or more blobs. periodt, they're gone ๐Ÿ’€

edit

Edit a blob and return a new digest

  • --editor="" โ€” select editor (vim, emacs, etc.)
  • --validate="" โ€” validate the result against a format (json, mediatype, etc.)

fetch

Fetch all content for an image into containerd

  • --all-metadata โ€” pull metadata for all platforms
  • --all-platforms โ€” pull content from all platforms
  • --hosts-dir="" โ€” custom hosts configuration directory
  • --http-dump โ€” dump all HTTP request/responses when interacting with container registry
  • --http-trace โ€” enable HTTP tracing for registry interactions
  • --label="" โ€” labels to attach to the image
  • --metadata-only โ€” pull all metadata including manifests and configs
  • --plain-http โ€” allow connections using plain HTTP
  • --platform="" โ€” pull content from a specific platform
  • --refresh="" โ€” refresh token for authorization server
  • --skip-verify, -k โ€” skip SSL certificate validation
  • --tlscacert="" โ€” path to TLS root CA
  • --tlscert="" โ€” path to TLS client certificate
  • --tlskey="" โ€” path to TLS client key
  • --user, -u="" โ€” user[:password] registry user and password

fetch-object

Retrieve objects from a remote

  • --hosts-dir="" โ€” custom hosts configuration directory
  • --http-dump โ€” dump all HTTP request/responses when interacting with container registry
  • --http-trace โ€” enable HTTP tracing for registry interactions
  • --plain-http โ€” allow connections using plain HTTP
  • --refresh="" โ€” refresh token for authorization server
  • --skip-verify, -k โ€” skip SSL certificate validation
  • --tlscacert="" โ€” path to TLS root CA
  • --tlscert="" โ€” path to TLS client certificate
  • --tlskey="" โ€” path to TLS client key
  • --user, -u="" โ€” user[:password] registry user and password

fetch-blob

Retrieve blobs from a remote

  • --hosts-dir="" โ€” custom hosts configuration directory
  • --http-dump โ€” dump all HTTP request/responses when interacting with container registry
  • --http-trace โ€” enable HTTP tracing for registry interactions
  • --plain-http โ€” allow connections using plain HTTP
  • --refresh="" โ€” refresh token for authorization server
  • --skip-verify, -k โ€” skip SSL certificate validation
  • --tlscacert="" โ€” path to TLS root CA
  • --tlscert="" โ€” path to TLS client certificate
  • --tlskey="" โ€” path to TLS client key
  • --user, -u="" โ€” user[:password] registry user and password

get

Get the data for an object

ingest

Accept content into the store

  • --expected-digest="" โ€” verify content against expected digest
  • --expected-size="" โ€” validate against provided size (default: 0)

list, ls

List all blobs in the store

  • --quiet, -q โ€” print only the blob digest

push-object

Push an object to a remote

  • --hosts-dir="" โ€” custom hosts configuration directory
  • --http-dump โ€” dump all HTTP request/responses when interacting with container registry
  • --http-trace โ€” enable HTTP tracing for registry interactions
  • --plain-http โ€” allow connections using plain HTTP
  • --refresh="" โ€” refresh token for authorization server
  • --skip-verify, -k โ€” skip SSL certificate validation
  • --tlscacert="" โ€” path to TLS root CA
  • --tlscert="" โ€” path to TLS client certificate
  • --tlskey="" โ€” path to TLS client key
  • --user, -u="" โ€” user[:password] registry user and password

label

Add labels to content

prune

Prunes content from the content store

references

Prunes preference labels from the content store (layers only by default)

  • --async โ€” allow garbage collection to cleanup asynchronously
  • --dry โ€” just show updates without applying (enables debug logging)

๐ŸŽ‰ events, event

Display containerd events โ€” the drama feed, honestly ๐Ÿ‘€


and bestie, we are so not done โ€” there's still more of this page, keep scrolling ๐Ÿฆ‹

๐ŸŒˆ images, image, i ๐ŸŒˆ

Manage images โ€” your whole local image stash, basically. Main character energy for your content store, no cap.

๐Ÿง check

Check existing images to ensure all content is available locally. It's a full vibe check for your image refs.

  • --quiet, -q โ€” Print only the ready image refs (fully downloaded and unpacked).
  • --snapshotter="" โ€” Snapshotter name. Empty value stands for the default value.

๐Ÿ“ฆ export

Export images โ€” pack the vibes up and send them out, bestie.

  • --all-platforms โ€” Exports content from all platforms.
  • --local โ€” Run export locally rather than through transfer API.
  • --platform="" โ€” Pull content from a specific platform.
  • --skip-manifest-json โ€” Do not add Docker compatible manifest.json to archive.
  • --skip-non-distributable โ€” Do not add non-distributable blobs such as Windows layers to archive.

๐Ÿ“ฅ import

Import images โ€” bring that content in, periodt.

  • --all-platforms โ€” Imports content for all platforms, false by default.
  • --base-name="" โ€” Base image name for added images, when provided only images with this name prefix are imported.
  • --compress-blobs โ€” Compress uncompressed blobs when creating manifest (Docker format only).
  • --digests โ€” Whether to create digest images (default: false).
  • --discard-unpacked-layers โ€” Allow the garbage collector to clean layers up from the content store after unpacking, cannot be used with --no-unpack, false by default.
  • --index-name="" โ€” Image name to keep index as, by default index is discarded.
  • --local โ€” Run import locally rather than through transfer API.
  • --no-unpack โ€” Skip unpacking the images, cannot be used with --discard-unpacked-layers, false by default.
  • --platform="" โ€” Imports content for specific platform.
  • --skip-digest-for-named โ€” Skip applying --digests option to images named in the importing tar (use it in conjunction with --digests).
  • --snapshotter="" โ€” Snapshotter name. Empty value stands for the default value.

๐Ÿ“‹ list, ls

List images known to containerd โ€” the little image directory of your dreams.

  • --quiet, -q โ€” Print only the image refs.

๐Ÿงท mount

Mount an image to a target path โ€” attachment era.

  • --hosts-dir="" โ€” Custom hosts configuration directory.
  • --http-dump โ€” Dump all HTTP request/responses when interacting with container registry.
  • --http-trace โ€” Enable HTTP tracing for registry interactions.
  • --label="" โ€” Labels to attach to the image.
  • --plain-http โ€” Allow connections using plain HTTP.
  • --platform="" โ€” Mount the image for the specified platform (default: linux/arm64/v8).
  • --refresh="" โ€” Refresh token for authorization server.
  • --rw โ€” Enable write support on the mount.
  • --skip-verify, -k โ€” Skip SSL certificate validation.
  • --snapshotter="" โ€” Snapshotter name. Empty value stands for the default value.
  • --tlscacert="" โ€” Path to TLS root CA.
  • --tlscert="" โ€” Path to TLS client certificate.
  • --tlskey="" โ€” Path to TLS client key.
  • --user, -u="" โ€” User[:password] Registry user and password.

๐Ÿชข unmount

Unmount the image from the target โ€” release the mount, bestie.

  • --hosts-dir="" โ€” Custom hosts configuration directory.
  • --http-dump โ€” Dump all HTTP request/responses when interacting with container registry.
  • --http-trace โ€” Enable HTTP tracing for registry interactions.
  • --label="" โ€” Labels to attach to the image.
  • --plain-http โ€” Allow connections using plain HTTP.
  • --refresh="" โ€” Refresh token for authorization server.
  • --rm โ€” Remove the snapshot after a successful unmount.
  • --skip-verify, -k โ€” Skip SSL certificate validation.
  • --snapshotter="" โ€” Snapshotter name. Empty value stands for the default value.
  • --tlscacert="" โ€” Path to TLS root CA.
  • --tlscert="" โ€” Path to TLS client certificate.
  • --tlskey="" โ€” Path to TLS client key.
  • --user, -u="" โ€” User[:password] Registry user and password.

๐Ÿš€ pull

Pull an image from a remote โ€” fetching the goods from the internet, iconic.

  • --all-metadata โ€” Pull metadata for all platforms.
  • --all-platforms โ€” Pull content and metadata from all platforms.
  • --hosts-dir="" โ€” Custom hosts configuration directory.
  • --http-dump โ€” Dump all HTTP request/responses when interacting with container registry.
  • --http-trace โ€” Enable HTTP tracing for registry interactions.
  • --label="" โ€” Labels to attach to the image.
  • --local โ€” Fetch content from local client rather than using transfer service.
  • --max-concurrent-downloads="" โ€” Set the max concurrent downloads for each pull (default: 0).
  • --plain-http โ€” Allow connections using plain HTTP.
  • --platform="" โ€” Pull content from a specific platform.
  • --print-chainid โ€” Print the resulting image's chain ID.
  • --refresh="" โ€” Refresh token for authorization server.
  • --skip-verify, -k โ€” Skip SSL certificate validation.
  • --snapshotter="" โ€” Snapshotter name. Empty value stands for the default value.
  • --tlscacert="" โ€” Path to TLS root CA.
  • --tlscert="" โ€” Path to TLS client certificate.
  • --tlskey="" โ€” Path to TLS client key.
  • --user, -u="" โ€” User[:password] Registry user and password.

๐Ÿ›ซ push

Push an image to a remote โ€” send it, slay.

  • --allow-non-distributable-blobs โ€” Allow pushing blobs that are marked as non-distributable.
  • --hosts-dir="" โ€” Custom hosts configuration directory.
  • --http-dump โ€” Dump all HTTP request/responses when interacting with container registry.
  • --http-trace โ€” Enable HTTP tracing for registry interactions.
  • --local โ€” Push content from local client rather than using transfer service.
  • --manifest="" โ€” Digest of manifest.
  • --manifest-type="" โ€” Media type of manifest digest (default: application/vnd.oci.image.manifest.v1+json).
  • --max-concurrent-uploaded-layers="" โ€” Set the max concurrent uploaded layers for each push (default: 0).
  • --plain-http โ€” Allow connections using plain HTTP.
  • --platform="" โ€” Push content from a specific platform.
  • --refresh="" โ€” Refresh token for authorization server.
  • --skip-verify, -k โ€” Skip SSL certificate validation.
  • --tlscacert="" โ€” Path to TLS root CA.
  • --tlscert="" โ€” Path to TLS client certificate.
  • --tlskey="" โ€” Path to TLS client key.
  • --user, -u="" โ€” User[:password] Registry user and password.

๐Ÿงน prune

Remove unused images โ€” cleanup time, but read the option carefully, bestie.

  • --all โ€” Remove all unused images, not just dangling ones (if all is not specified no images will be pruned).

๐Ÿ—‘๏ธ delete, del, remove, rm

Remove one or more images by reference โ€” yeet by ref.

  • --sync โ€” Synchronously remove image and all associated resources.

๐Ÿท๏ธ tag

Tag an image โ€” give it a new little name sticker.

  • --force โ€” Force target_ref to be created, regardless if it already exists.
  • --local โ€” Run tag locally rather than through transfer API.

๐Ÿ”– label

Set and clear labels for an image โ€” annotate the vibe.

  • --replace-all, -r โ€” Replace all labels.

๐Ÿ”„ convert

Convert an image โ€” glow-up, but for media types and layers.

  • --all-platforms โ€” Exports content from all platforms.
  • --oci โ€” Convert Docker media types to OCI media types.
  • --platform="" โ€” Pull content from a specific platform.
  • --uncompress โ€” Convert tar.gz layers to uncompressed tar layers.

๐Ÿ“Š usage

Display usage of snapshots for a given image ref โ€” see what's taking up space, iykyk.

  • --snapshotter="" โ€” Snapshotter name. Empty value stands for the default value.

๐ŸŽซ leases ๐ŸŽซ

Manage leases โ€” the resource-holding little contracts of your containerd era.

๐Ÿ“‹ list, ls

List all active leases.

  • --quiet, -q โ€” Print only the blob digest.

โœจ create

Create lease.

  • --expires, -x="" โ€” Expiration of lease (0 value will not expire) (default: 24h0m0s).
  • --id="" โ€” Set the id for the lease, will be generated by default.

๐Ÿ—‘๏ธ delete, del, remove, rm

Delete a lease.

  • --sync โ€” Synchronously remove leases and all unreferenced resources.

๐Ÿช namespaces, namespace, ns ๐Ÿช

Manage namespaces โ€” separate little worlds, fr fr.

โœจ create, c

Create a new namespace.

๐Ÿ“‹ list, ls

List namespaces.

  • --quiet, -q โ€” Print only the namespace name.

๐Ÿ—‘๏ธ remove, rm

Remove one or more namespaces.

  • --cgroup, -c โ€” Delete the namespace's cgroup.

๐Ÿ”– label

Set and clear labels for a namespace.


๐Ÿงš pprof ๐Ÿงš

Provide golang pprof outputs for containerd โ€” performance detective mode, lowkey iconic.

  • --debug-socket, -d="" โ€” Socket path for containerd's debug server (default: /run/containerd/debug.sock).

๐Ÿงต block

Goroutine blocking profile.

  • --debug="" โ€” Debug pprof args (default: 0).

๐Ÿงถ goroutines

Dump goroutine stack dump.

  • --debug="" โ€” Debug pprof args (default: 2).

๐Ÿซง heap

Dump heap profile.

  • --debug="" โ€” Debug pprof args (default: 0).

๐Ÿ”ฅ profile

CPU profile.

  • --debug="" โ€” Debug pprof args (default: 0).
  • --seconds, -s="" โ€” Duration for collection (seconds) (default: 30s).

๐Ÿชก threadcreate

Goroutine thread creating profile.

  • --debug="" โ€” Debug pprof args (default: 0).

๐Ÿ›ฐ๏ธ trace

Collect execution trace.

  • --debug="" โ€” Debug pprof args (default: 0).
  • --seconds, -s="" โ€” Trace time (seconds) (default: 5s).

run

okay bestie, this is THE command to run a container โ€” the main character of ctr, no cap. โœจ here's every single flag so you can customize your little container baby exactly how you want. ๐Ÿ’…

  • --allow-new-privs โ€” turn off the OCI spec's NoNewPrivileges feature flag. lowkey spicy but sometimes you need it.
  • --annotation="" โ€” add extra OCI annotations, like foo=bar. cute metadata vibes.
  • --apparmor-default-profile="" โ€” turn on AppArmor with the default profile, using the name you give it, e.g. "cri-containerd.apparmor.d".
  • --apparmor-profile="" โ€” turn on AppArmor with an already-existing custom profile. periodt.
  • --blockio-class="" โ€” name of the blockio class to associate the container with.
  • --blockio-config-file="" โ€” file path to blockio class definitions. by default, class definitions are not loaded. (so don't be surprised if it's empty ๐Ÿ‘€)
  • --cap-add="" โ€” add Linux capabilities. set capabilities with the 'CAP_' prefix, bestie.
  • --cap-drop="" โ€” drop Linux capabilities. also uses the 'CAP_' prefix.
  • --cgroup="" โ€” cgroup path. to disable use of cgroup, set this to "" explicitly. yes, literally empty string. ๐Ÿ’€
  • --cni โ€” enable CNI networking for the container. networking slay.
  • --config, -c="" โ€” path to the runtime-specific spec config file.
  • --cpu-period="" โ€” limit CPU CFS period. (default: 0)
  • --cpu-quota="" โ€” limit CPU CFS quota. (default: -1)
  • --cpu-shares="" โ€” set the cpu shares. (default: 1024)
  • --cpus="" โ€” set the CFS cpu quota. (default: 0.000000)
  • --cwd="" โ€” specify the working directory of the process.
  • --detach, -d โ€” detach from the task after it has started execution. cannot be used with --rm. (choose your fighter ๐ŸฅŠ)
  • --device="" โ€” file path to a device to add to the container; or a path to a directory tree of devices to add to the container. so many device options, iykyk.
  • --env="" โ€” specify additional container environment variables, e.g. FOO=bar.
  • --env-file="" โ€” specify additional container environment variables in a file, e.g. FOO=bar, one per line.
  • --fifo-dir="" โ€” directory used for storing IO FIFOs.
  • --gidmap="" โ€” run inside a user namespace with the specified GID mapping range. format is container-gid:host-gid:length. get those mappings right, bestie.
  • --gpus="" โ€” add gpus to the container. gpu girlies rise up. ๐ŸŽฎ
  • --hostname="" โ€” set the container's host name.
  • --label="" โ€” specify additional labels, e.g. foo=bar.
  • --log-uri="" โ€” log uri. that's it. that's the tweet.
  • --memory-limit="" โ€” memory limit (in bytes) for the container. (default: 0)
  • --mount="" โ€” specify additional container mount, e.g. type=bind,src=/tmp,dst=/host,options=rbind:ro. mounts are iconic.
  • --net-host โ€” enable host networking for the container. living on the edge.
  • --no-pivot โ€” disable use of pivot-root (linux only).
  • --null-io โ€” send all IO to /dev/null. bye bye output. ๐Ÿ™ˆ
  • --pid-file="" โ€” file path to write the task's pid.
  • --platform="" โ€” run image for specific platform.
  • --privileged โ€” run privileged container. highkey powerful, use responsibly.
  • --privileged-without-host-devices โ€” don't pass all host devices to privileged container. a little less chaotic.
  • --rdt-class="" โ€” name of the RDT class to associate the container with. specifies a Class of Service (CLOS) for cache and memory bandwidth management. fancy.
  • --read-only โ€” set the container's filesystem as readonly. no writing, only vibes.
  • --remap-labels โ€” provide the user namespace ID remapping to the snapshotter via label options; requires snapshotter support. don't forget that part.
  • --rm โ€” remove the container after running. cannot be used with --detach. again, choose one. ๐Ÿ’…
  • --rootfs โ€” use custom rootfs that is not managed by containerd snapshotter. going rogue.
  • --rootfs-propagation="" โ€” set the propagation of the container rootfs.
  • --runc-binary="" โ€” specify runc-compatible binary.
  • --runc-root="" โ€” specify runc-compatible root.
  • --runc-systemd-cgroup โ€” start runc with systemd cgroup manager.
  • --runtime="" โ€” runtime name or absolute path to runtime binary. (default: io.containerd.runc.v2)
  • --runtime-config-path="" โ€” optional runtime config path.
  • --sandbox="" โ€” create the container in the given sandbox.
  • --seccomp โ€” enable the default seccomp profile.
  • --seccomp-profile="" โ€” file path to custom seccomp profile. seccomp must be set to true before using seccomp-profile. important warning, bestie! โš ๏ธ
  • --snapshotter="" โ€” snapshotter name. empty value stands for the default value.
  • --snapshotter-label="" โ€” labels added to the new snapshot for this container.
  • --tty, -t โ€” allocate a TTY for the container. terminal girlies unite.
  • --uidmap="" โ€” run inside a user namespace with the specified UID mapping range. format is container-uid:host-uid:length.
  • --user, -u="" โ€” username or user id, group optional. (format: [:]) โ€” yes, that's literally what the page says. ๐Ÿ™ƒ
  • --with-ns="" โ€” specify existing Linux namespaces to join at container runtime. (format: ':')

snapshots, snapshot

manage snapshots, the little frozen moments of your container life. ๐ŸŽ€

  • --snapshotter="" โ€” snapshotter name. empty value stands for the default value.

commit

commit an active snapshot into the provided name. like saving your progress in a game. โœจ

diff

get the diff of two snapshots. the default second snapshot is the first snapshot's parent. so sibling energy? no, parent energy. ๐Ÿ˜ญ

  • --keep โ€” keep diff content. up to creator to delete it.
  • --label="" โ€” labels to attach to the image.
  • --media-type="" โ€” media type to use for creating diff. (default: application/vnd.oci.image.layer.v1.tar+gzip)
  • --ref="" โ€” content upload reference to use.

info

get info about a snapshot. just the tea. ๐Ÿต

list, ls

list snapshots. the classic.

mounts, m, mount

mount gets mount commands for the snapshots. get those mounts!

prepare

prepare a snapshot from a committed snapshot. glow-up moment.

  • --mounts โ€” print out snapshot mounts as JSON.
  • --target, -t="" โ€” mount target path. will print mount if provided.

delete, del, remove, rm

remove snapshots. bye bestie. ๐Ÿ‘‹

label

add labels to content.

tree

display tree view of snapshot branches. it's giving family tree but for snapshots. ๐ŸŒณ

unpack

unpack applies layers from a manifest to a snapshot.

  • --snapshotter="" โ€” snapshotter name. empty value stands for the default value.

usage

usage snapshots. how much space are we talking?

  • -b โ€” display size in bytes.

view

create a read-only snapshot from a committed snapshot.

  • --mounts โ€” print out snapshot mounts as JSON.
  • --target, -t="" โ€” mount target path. will print mount if provided.

tasks, t, task

manage tasks โ€” the actual running processes inside your containers. this is where the action happens. ๐Ÿ”ฅ

attach

attach to the IO of a running container. like sliding into their DMs but for input/output. ๐Ÿ’ฌ

checkpoint

checkpoint a container. freeze time, essentially. โธ๏ธ

  • --exit โ€” stop the container after the checkpoint.
  • --image-path="" โ€” path to criu image files.
  • --work-path="" โ€” path to criu work files and logs.

delete, del, remove, rm

delete one or more tasks. no cap, sometimes you gotta let go. ๐Ÿ’€

  • --exec-id="" โ€” process ID to kill.
  • --force, -f โ€” force delete task process. aggressive but effective.

exec

execute additional processes in an existing container. like opening a new tab in your terminal. โœจ

  • --cwd="" โ€” working directory of the new process.
  • --detach, -d โ€” detach from the task after it has started execution.
  • --exec-id="" โ€” exec specific id for the process.
  • --fifo-dir="" โ€” directory used for storing IO FIFOs.
  • --log-uri="" โ€” log uri for custom shim logging.
  • --tty, -t โ€” allocate a TTY for the container.
  • --user="" โ€” user id or name.

list, ls

list tasks. see who's running the show.

  • --quiet, -q โ€” print only the task id. minimalism slay.

kill

signal a container. (default: SIGTERM) โ€” dramatic exit or gentle nudge, your choice. ๐Ÿ’…

  • --all, -a โ€” send signal to all processes inside the container.
  • --exec-id="" โ€” process ID to kill.
  • --signal, -s="" โ€” signal to send to the container.

metrics, metric

get a single data point of metrics for a task with the built-in Linux runtime. numbers girlies, this one's for you. ๐Ÿ“Š

  • --format="" โ€” "table" or "json". (default: table)

pause

pause an existing container. brb, frozen. ๐ŸงŠ

ps

list processes for container. who's inside?

resume

resume a paused container. welcome back bestie. ๐ŸŒธ

start

start a container that has been created. it's alive! โšก

  • --detach, -d โ€” detach from the task after it has started execution.
  • --fifo-dir="" โ€” directory used for storing IO FIFOs.
  • --log-uri="" โ€” log uri.
  • --no-pivot โ€” disable use of pivot-root (linux only).
  • --null-io โ€” send all IO to /dev/null.
  • --pid-file="" โ€” file path to write the task's pid.

install

install a new package. like apt install but for containerd things. ๐Ÿ“ฆ

  • --libs, -l โ€” install libs from the image.
  • --path="" โ€” set an optional install path other than the managed opt directory.
  • --replace, -r โ€” replace any binaries or libs in the opt directory. out with the old, in with the new. ๐Ÿ”„

oci

OCI tools. the standards, the specs, the whole vibe. ๐ŸŒ

spec

see the output of the default OCI spec. it's giving default settings.

  • --platform="" โ€” platform of the spec to print. (Examples: 'linux/arm64', 'windows/amd64')

sandboxes, sandbox, sb, s

manage sandboxes. because sometimes you need a whole extra layer of isolation, bestie. ๐Ÿ๏ธ

run, create, c, r

run a new sandbox. fresh start energy. โœจ

  • --runtime="" โ€” runtime name. (default: io.containerd.runc.v2)

list, ls

list sandboxes. see all your little islands.

  • --filters="" โ€” the list of filters to apply when querying sandboxes from the store.

remove, rm

remove sandboxes. goodbye island. ๐Ÿ‘‹

  • --force, -f โ€” ignore shutdown errors when removing sandbox.

info

print the server info. the lore. the backstory. ๐Ÿ“–


deprecations

list

print warnings for deprecations. the "hey bestie, this is old" alerts. โš ๏ธ

  • --format="" โ€” output format to use. (Examples: 'default', 'json')

shim

interact with a shim directly. going straight to the source, no middleman. ๐Ÿ’…

  • --id="" โ€” container id.

delete

delete a container with a task. yeet. ๐Ÿ—‘๏ธ

exec

exec a new process in the task's container. more processes, more fun.

  • --attach, -a โ€” stay attached to the container and open the fifos.
  • --cwd="" โ€” current working directory.
  • --env, -e="" โ€” add environment vars.
  • --spec="" โ€” runtime spec.
  • --stderr="" โ€” specify the path to the stderr fifo.
  • --stdin="" โ€” specify the path to the stdin fifo.
  • --stdout="" โ€” specify the path to the stdout fifo.
  • --tty, -t โ€” enable tty support.

start

start a container with a task. let's gooo. ๐Ÿš€

state

get the state of all the processes of the task. the full status report. ๐Ÿ“‹


and that's a wrap! ๐ŸŒˆ this page came from ctr(8) with no version or date shown, so consider this your certified bestie-approved manual. now go slay those containers, periodt. ๐Ÿ’–๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from