🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours scrolling social media and waste money on things we forget, but won’t spend 30 minutes a day earning certifications that can change our lives.
Master in DevOps, SRE, DevSecOps & MLOps by DevOpsSchool!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

List of Commands example for working with crictl


Here is a list of command examples for working with crictl:

List all containers:
$ crictl ps

Inspect a container:
$ crictl inspect my-container

Run a container:
$ crictl run docker.io/library/nginx:latest

Attach a shell to a running container:
$ crictl exec -it my-container sh

Stop a running container:
$ crictl stop my-container

Remove a container:
$ crictl rm my-container

Pull an image:
$ crictl pull docker.io/library/nginx:latest

Remove an image:
$ crictl image rm docker.io/library/nginx:latest

Here are some more advanced command examples:

List all images:
$ crictl images

Inspect an image:
$ crictl inspecti docker.io/library/nginx:latest

Start a container with a specific network:
$ crictl run --network bridge docker.io/library/nginx:latest

Start a container with a specific volume mount:
$ crictl run --mount type=bind,source=/host/path,target=/container/path docker.io/library/nginx:latest

Execute a command in a running container and stream the output to the terminal:
$ crictl logs -f my-container
Subscribe
Notify of
guest


1 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Peter Whall
Peter Whall
1 year ago

I’m running: crictl version v1.28.0
When I run ‘crictl run docker.io/library/nginx:latest’ I just get the output of the help page like I’m running from ‘crictl run help’.
The indication from this output is that you know have to pass a .json or .yaml file with this command, is this now the case?
‘crictl run [command options] container-config.[json|yaml] pod-config.[json|yaml]’
Thanks Pete

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

1
0
Would love your thoughts, please comment.x
()
x