Skip to content

Files

Latest commit

author
Denny Zhang
Jun 8, 2020
2621ac2 · Jun 8, 2020

History

History

cheatsheet-crio-A4

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Feb 2, 2020
Jun 8, 2020
Dec 30, 2018

1 CheatSheet: CRI-O

linkedin
github
slack


PRs Welcome

File me Issues or star this repo.

1.1 cri-o Basic

NameSummary
cri-oAnother container runtime like dockerd. Initialized from Redhat
cri-o vs dockerd
ReferenceCheatSheet: Docker, CheatSheet: CRI-O, CheatSheet: rkt, CheatSheet: containerd

1.2 cri-o Components

NameSummary
crictlFor troubleshooting and working directly with CRI-O container engines
runcFor running container images
podmanCLI tool to manage pods and images
BuildahFor building, pushing and signing container images
SkopeoFor copying, inspecting, deleting, and signing images
QuayBuilds, analyzes, distributes your container images. Like CNCF Harbor

https://raw.githubusercontent.com/dennyzhang/cheatsheet.dennyzhang.com/master/cheatsheet-crio-A4/crio-arch.png

1.3 Run cri-o as k8s container engine

NameSummary
Run cri-o with minikubeminikube start --network-plugin=cni --container-runtime=cri-o
cri-o conf file/etc/crio/crio.conf
Configure cri-o image registryregistries = ['docker.io']
Restart cri-ominikube ssh, then systemctl restart crio
Check statussystemctl status
ReferenceLink: Using the CRI-O Container Engine

1.4 podman

NameSummary
podman image registry file/etc/containers/registries.conf
pull containerpodman pull nginx:alpine
List all imagespodman images
List all contianerspodman ps

1.5 podman online usage

$ sudo podman --help
WARN[0000] unable to find /etc/containers/registries.conf. some podman (image shortnames) commands may be limited
NAME:
   podman - manage pods and images

USAGE:
   podman [global options] command [command options] [arguments...]

VERSION:
   0.4.1

COMMANDS:
     attach           Attach to a running container
     commit           Create new image based on the changed container
     build            Build an image using instructions in a Dockerfile
     create           create but do not start a container
     diff             Inspect changes on container's file systems
     exec             Run a process in a running container
     export           Export container's filesystem contents as a tar archive
     history          Show history of a specified image
     images           list images in local storage
     import           Import a tarball to create a filesystem image
     info             display system information
     inspect          Displays the configuration of a container or image
     kill             Kill one or more running containers with a specific signal
     load             load an image from docker archive
     login            login to a container registry
     logout           logout of a container registry
     logs             Fetch the logs of a container
     mount            Mount a working container's root filesystem
     pause            Pauses all the processes in one or more containers
     ps               List containers
     port             List port mappings or a specific mapping for the container
     pull             pull an image from a registry
     push             push an image to a specified destination
     restart          Restart one or more containers
     rm               podman rm will remove one or more containers from the host.  The container name or ID can be used.
                                  This does not remove images.  Running containers will not be removed without the -f option.
     rmi              removes one or more images from local storage
     run              run a command in a new container
     save             Save image to an archive
     search           search registry for image
     start            Start one or more containers
     stats            Display percentage of CPU, memory, network I/O, block I/O and PIDs for one or more containers
     stop             Stop one or more containers
     tag              Add an additional name to a local image
     top              Display the running processes of a container
     umount, unmount  Unmount a working container's root filesystem
     unpause          Unpause the processes in one or more containers
     version          Display the PODMAN Version Information
     wait             Block on one or more containers
     help, h          Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --cni-config-dir value            path of the configuration directory for CNI networks
   --config value, -c value          path of a config file detailing container server configuration options
   --conmon value                    path of the conmon binary
   --cpu-profile value               path for the cpu profiling results
   --log-level value                 log messages above specified level: debug, info, warn, error (default), fatal or panic (default: "error")
   --root value                      path to the root directory in which data, including images, is stored
   --runroot value                   path to the 'run directory' where all state information is stored
   --runtime value                   path to the OCI-compatible binary used to run containers, default is /usr/bin/runc
   --storage-driver value, -s value  select which storage driver is used to manage storage of images and containers (default is overlay)
   --storage-opt value               used to pass an option to the storage driver
   --help, -h                        show help
   --version, -v                     print the version

1.6 More Resources

https://github.com/containers

https://cri-o.io/

License: Code is licensed under MIT License.