Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Modern DevOps Practices

You're reading from   Modern DevOps Practices Implement and secure DevOps in the public cloud with cutting-edge tools, tips, tricks, and techniques

Arrow left icon
Product type Paperback
Published in Sep 2021
Publisher Packt
ISBN-13 9781800562387
Length 530 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Gaurav Agarwal Gaurav Agarwal
Author Profile Icon Gaurav Agarwal
Gaurav Agarwal
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1: Container Fundamentals and Best Practices
2. Chapter 1: The Move to Containers FREE CHAPTER 3. Chapter 2: Containerization with Docker 4. Chapter 3: Creating and Managing Container Images 5. Chapter 4: Container Orchestration with Kubernetes – Part I 6. Chapter 5: Container Orchestration with Kubernetes – Part II 7. Section 2: Delivering Containers
8. Chapter 6: Infrastructure as Code (IaC) with Terraform 9. Chapter 7: Configuration Management with Ansible 10. Chapter 8: IaC and Config Management in Action 11. Chapter 9: Containers as a Service (CaaS) and Serverless Computing for Containers 12. Chapter 10: Continuous Integration 13. Chapter 11: Continuous Deployment/Delivery with Spinnaker 14. Chapter 12: Securing the Deployment Pipeline 15. Section 3: Modern DevOps with GitOps
16. Chapter 13: Understanding DevOps with GitOps 17. Chapter 14: CI/CD Pipelines with GitOps 18. Other Books You May Enjoy

Running your first container

You create Docker containers out of Docker container images. While we will discuss container images and their architecture in the following chapters, an excellent way to visualize it is as a copy of all files, application libraries, and dependencies that would comprise your application environment, similar to a virtual machine image.

To run a Docker container, we will use the docker run command, which has the following structure:

$ docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]

Let's look at each of them using working examples.

In its simplest form, you can use docker run by simply typing the following:

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
0e03bdcc26d7: Pull complete
Digest: sha256:e7c70bb24b462baa86c102610182e3efcb12a04854e8c582
838d92970a09f323
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
...

If you remember...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime