Technology

What is Docker?

Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.

Docker Architecture

Installation in Rhel Machine

Rpm Required for installing Docker

  • Container-selinux-2.74-1.el7.noarch.rpm
  • Libselinux-2.5-14.1.el7.x86_64.rpm
  • Libselinux-python-2.5-14.1.el7.x86_64.rpm
  • Libselinux-utils-2.5-14.1.el7.x86_64.rpm
  • Libsemanagement-2.5-14.el7.x86_64.rpm
  • Libsemanagement-python-2.5-14.el7.x86_64.rpm
  • Libsepol-2.5-10.el7.x86_64.rpm
  • Policcycoreutils-2.5-29.el7.x86_64.rpm
  • Policcycoreutils-python-2.5-29.el7.x86_64.rpm
  • Selinux-policy-3.13.1-229.el7.noarch.rpm
  • Selinux-policy-targeted-3.13.1-229.el7.noarch.rpm
  • Setools-libs-3.3.8-4.el7.x86_64.rpm download address

Don’t worry, here is the link to download:

Docker:  https://drive.google.com/drive/folders/1fJqEzzVCDnJtOEeCNyix3dFpaRD8pVua?usp=sharing

Docker Compose:

https://drive.google.com/drive/folders/1c1IXCowT5VUppPyxwoDmLiTKgbND7gml?usp=sharing

Move all the rpm and docker file to the Target VM-Machine,

Output:

Output:

Now till now all the dependencies are resolved for Installing Docker Now go to actual docker file and installed that

To install Docker

Output:

Now let’s start the docker service

Command:

Bingo Docker is running; Now let’s check the version and install docker-compose

Docker Compose:

What is Docker-Compose?

Docker Compose is a tool that was developed to help define and share multi-container applications. With Compose, we can create a YAML file to define the services and with a single command, can spin everything up or tear it all down.

Here is the link to download Docker Compose: https://github.com/docker/compose/releases

After Docker and Docker Compose is successfully installed let’s play with it

For Test I am going to pull a docker images from a VM which has internet access and import that image into air gap VM so we can check our configuration working or not 

Let’s pull some images from docker in internet access VM

For Downloading the image from docker hub

You can list down all the docker images which you pull from docker hub

Now we are going to export the docker container and import it to target VM

Copy these ubuntu.tar file to target machine which you want to import and run locally

You can use different methods to transfer files from one vm to another (scp  , ftp, python3 server etc.)

Target VM (Not Internet access)

Create a directory under which all the files and directories are stored in the container

As you can see docker shows us the default directory of ubuntu because it’s a ubuntu container

Now we can import that container

Start the container

Bingo docker is up 🙂

Docker

Container requirements and recommendations From Official Website

The following table describes the minimum and recommended allocation of resources for each Speech container:

Docker

The goal of the Docker series blog is to provide you, the reader, with a fundamental grasp of Docker. A complete SMB or enterprise-level deployment, on the other hand, is significantly more complicated and needs solution architecture from the ground up, taking into consideration future scalability as well as real deployment and daily operations, as we all know. Zindagi Technologies offers services like security operation center, DevOps tools, and many more to aid you in implementing cloud-based applications successfully. If you have any questions, comments, or suggestions, please contact us at +919773973971.

Author
Sourabh Dey
Associate Consultant – Server & Virtualization 

Leave a comment

Your email address will not be published.