Container 101
Container 101

Container 101

Container Technology

A standard way to package the applications and its dependencies so it can be moved between environments and run without changes.

Everything outside the container can be standardized because of the container work by isolating the differences between applications inside it.

For example: let's say we have a messaging application that was written in Java and uses version 1.2 of java and using a specific library for messaging (MSG 2.3) and I have three different platforms:

  • My personal computer (windows 10).
  • Public cloud (Ubuntu).
  • Macbook Pro (macOS High Sierra).

And I want to run it on all different platform. In order to be able to run this application, we must install the required packages like Java 1.2 and MSG 2.3. However, if the macOS does not support the Java 1.2, I can not run it.

By using container technology I can build an image that contains all the required packages so if I want to run the application in the different platform it will be easy, even platform that does not support the specific packages.

Advantages of Containers:

  • Containers are portable.
  • Containers are easy to manage.
  • Container images are easy to share, download, and delete.
  • Containers provide “just enough” isolation.
  • Containers use hardware more efficiently.

What is “Virtual Machine”?

virtual machine ( VM) an operating system (OS) or application environment that is installed on software, which imitates dedicated hardware. VMs run on top of a physical machine

Container vs. VM

The different between VM and Container  

  • The container's size is less than VM, so running a container or moving a container will be faster.
  • Every VM uses its own operating system but containers share a common operating system, so containers reduce management overhead.

Container Software

Docker an open-source project that automates the deployment of software applications inside containers by providing an additional layer of abstraction and automation of OS-level virtualization on Linux.

Docker components

Docker_Host: platform will execute the request from CLI Docker Client, and the platform could be on your computer or in the cloud.

Docker Client: used to communicate with docker host so you can enter a command (CLI) and docker client can understand it. For example: if I want to run a docker container I will use the CLI to run this container when I enter the command for the build will docker client communicate with Docker_Host then execute it.

Docker Registry: stores Docker images. Docker Hub and Docker Cloud are public registries that anyone can use, and Docker is configured to look for images on Docker Hub by default. You can even run your own private registry.

Docker Daemon/Engine: the background service running on the host that executes commands sent to or receive from the Docker Client — like building, running, and distributing your containers.

Dockerfile: a text document that contains all the commands a user could call on the command line to build a Docker image. These instructions can be:

 #

# Super simple example of a Dockerfile

#

FROM ubuntu:latest

MAINTAINER Omar alfawzan "[email protected]"

RUN apt-get update

RUN apt-get install -y python python-pip wget

RUN pip install Flask

ADD hello.py /home/hello.py

WORKDIR /home


Docker image: an application that built up from a series of layers. Each layer represents an instruction in the image’s Dockerfile. Each layer except the very last one is read-only. Images set both what you want for your packaged application and its dependencies to look like, and what processes to run when it’s launched. So you can run your application wherever you want.

Docker container: a live running instance of a Docker image are built from it.

This picture shows the live running container, we can see there are layers that consist of the operating system, application code, runtime, system tools, system libraries, and etc. With all layers inside the container, we can run it everywhere.

Conclusion

In this article, we learn about container technology, the difference between VM and Containers, Docker and its components. I hope you’re now familiar with container technology and maybe even use it in a project one day.If you are interested to start visit IBM Cloud Container Registry. Please share your comments or questions below.




Shady Mansour

Cloud Security Sales Specialist | Palo Alto Networks

6 年

Great read Omar!

回复
Yasser B.

IT Management | Network | Cloud&Security

6 年

Thanks Omar ,

回复
Reema AlMashari

Solution Consultant @ ServiceNow | Software Engineering | Entrepreneurship | Digital Transformation | Product Management

6 年

Nice article Omar! I like how explained a difficult concept in a uncomplicated way.

Yazeed ALZahrani

Senior Software Engineer | iOS Developer

6 年

Good information, Thank you Mr. Omar

回复

要查看或添加评论,请登录

Omar Alfawzan的更多文章

  • ?????? ??????? ???????? ?? ????? ???? ????

    ?????? ??????? ???????? ?? ????? ???? ????

    ????? ?? ???? ?????? ?????? ?????? ??????? ?? ?????? ???????? ??????? ????? ????? ??????? ???????? ?? ??? ??????? ???…

    5 条评论
  • ?????? ????? ???? ?????? ?? ??? ?????

    ?????? ????? ???? ?????? ?? ??? ?????

    ???? ???? ???? ?? Product Manager ???? ????? ????? ?? ????? ???? ??? ?????? ??????? ??? ?????? ???? ???? ?????? ???…

  • Product Manager | ?????? ????? ????

    Product Manager | ?????? ????? ????

    ??? ??? ?????? ?????? ???? ????? ?????? "??????? ????????" ???? ??? ?????? ??????? ??? ?? ??????? ??? ????? ????????…

    6 条评论
  • Container 102

    Container 102

    Hi everyone in the previous article, last time I talked about container technology, the difference between VM and…

    2 条评论
  • So Many Clouds, So Little Time — Jump Start Your Multi-cloud Strategy - Meetup

    So Many Clouds, So Little Time — Jump Start Your Multi-cloud Strategy - Meetup

    Meetup The meetup was on December 25th, 2018, and the speakers were Salah Eletreby, Hybrid Cloud Integration from the…

社区洞察

其他会员也浏览了