Containers & DevOps academy guide

Kunal Kushwaha avatar
By Kunal Kushwaha
DevRel Manager


With Civo Academy, learn about the technical definition and benefits of containers in relation to DevOps.



In this section, we are going to learn about what containers are. Before we dive into it, let's imagine that you want to transport all these goods that you see on the screen from one country to another. And you might be wondering, how do I transport a car, a few barrels, grains, a piano, and so many different items, from one country to another? They might require some different modes of transportation in all these things. This car might be transported in some other way, and the grains might be transported in some other way. But the thing is that we're transporting it from one place to another.

What is a container in general?

Suppose we can look at an intermodal like a shipping container. You might have seen containers in ships and stuff. A standard container is loaded with virtually any goods and stays sealed until it reaches the final delivery So, in between, it can be loaded, unloaded, stacked, and transported efficiently over long distances from one place to another. You can put everything in it, and that box can then be transported from one place to another.

Example of a container with respect to an application

Now, imagine that you are building your own application. And then it's probably like that, "hey, it's looking great on my machine and now I share it with my friend." So now you share that application with your friend. And then your friend is like, "Hey, it's, you know, not working on my machine." And then you say the classic, "It works on my machine," thing. Now, wouldn't it be nice if we could do something like this? If we could have something like this, you have your static website, your database, such as the frontend part, the queue part, the backend part, all these things you put inside a box, and you give that box to your friend. This will make sure that the application will run on your friend's system.

Technological definition of a Kunernetes container

We can define an engine that enables any payload to be encapsulated as a lightweight, portable, self-sufficient container. It can be manipulated using standard operations and run consistently on virtually any hardware platform. So, the particular box that we are talking about in which your application is there and running is a container. You'll find a much more technical definition from many excellent resources like the Docker website and others.

A container is a standard unit of software that packages all the code, all the dependencies, and everything required to run your application so that your application runs quickly and reliably from one environment to another. So, you might be getting this question like, you know, why are we using containers, what are the benefits of containers? So, as you will see later on, it's a very streamlined way to build, test, deploy, redeploy your applications, etc., on multiple environments, from the local laptop to an on-premise data center and even to the cloud.

Benefits of a container

Some of the benefits include there is less overhead. So, containers require fewer system resources than traditional hardware or virtual machine environments, which we'll talk more about in the following video, like containers versus virtual machines because they don't include the operating system like images. Instead, they use the host operating system, and we'll talk more about that later. It also increases portability. So applications running in containers can be deployed quickly to multiple operating systems and hardware platforms. It also offers more consistent operations, so the DevOps teams know that applications in containers will run the same, regardless of where they are deployed, "It works on my machine," problem is now solved. It also provides a lot of efficiencies. For example, your containers allow applications to be more rapidly deployed, patched, or scaled. So, we'll talk more about that later. Finally, containers also support agile and DevOps efforts to provide better application development and accelerate deployment, development, testing, and production cycles.

So, imagine you're running an application, and so many other companies are running their applications inside these little boxes and containers. We'll look into the following video about why they're running it, how it is beneficial, and a faster and virtual machine. Then, imagine that you want to, you know, scale up your containers, create new instances, all these things, you know, containers allow us to, you know, do. So if you want to scale your application and stuff, create new containers. And then, you can use something like a container orchestration engine like Kubernetes, which we'll also learn more about in this course.

In conclusion

That was pretty much about the basics of containers. So, your application is going to be running inside a container. And it's just like a form of visualization, virtualization. But, also, you can say that a single container can be used to run anything, be that of a small Microsoft Office or a software process of a more extensive application. It's going to be an isolated environment from your other operating system in which your container is running. The following video will look into the demo, the containers' infrastructure, and the comparison between containers and virtual machines.

Don't stop now, check out your next lesson