Trending Technology Machine Learning, Artificial Intelligent, Block Chain, IoT, DevOps, Data Science

Recent Post

Codecademy Code Foundations

Search This Blog

Docker in DevOps

  • 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.
The Docker platform :
  • Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security allow you to run many container simultaneously on a given host. Containers are lightweight because they don't need the extra load of a hypervisor, but run directly within the host machine's kernel.
  • Docker provides tooling and a platform to manage the life cycle of your containers.
Components of Docker :
  • Docker has the following components
  • Docker for Mac
  • Docker for Linux
  • Docker for Windows
  • Docker Engine
  • Docker Hub
  • Docker Compose
Installation Docker on Linux
  • To start the installation of Docker, we are going to use an Ubuntu instance. You can use Oracle Virtual Box to setup a virtual Linux instance, in case you don't have it already.
  • The following screenshot shows a simple Ubuntu server which has been installed on Oracle Virtual Box. There is an OS user named demo which has been defined on 


Docker Installation Steps :

To install Docker, we need to follow the steps given below.

Step 1
   Before installing Docker, you first have to ensure that you have the right Linux running.
  Syntax
      uname  -a

Syntax
      uname  -a

Step 2  
    You need to update the OS with the latest packages, which can be done via the following command -
  apt - get
 Syntax
      sudo apt-qet update

Step 3
   The next step is to install the necessary certificates that will be required to work with the Docker site later on to download the necessary Docker packages. It can be done with the following command.
   sudo apt-get install apt-transport-https ca-certificates


Step 4
    The next step is to add the new GPG key. This key is required to ensure that all data is encrypted when downloading the necessary packages for Docker.
The following command will download the key with the ID
 58118E89F3A912897C070ADBF76221572C52609D
       from the keyserverhkp://ha.pool.sks-keyservers.net:80 and adds it to the adv keychain

Step 5
  Next, depending on the version of Ubuntu you have, you will need to add the relevant site to the docker.list for the apt package manager, so that it will be able to detect the docker packages from the Docker site and download them accordingly.

Step 6
   If you want to verify that the packages manager is pointing to the right repository, you can do it by issuing the apt-cache command.
    apt-cache policy docker-engine

Step7
   Issue the apt-get update command to ensure to ensure all the packages on the local system are up to date.

Step 8
  For Ubuntu Trusty, Wily and Xenial, we have to install the linux-image-extra-* kernel packages, which allows one to use the aufs storage driver. This driver is used by the newer versions of Docker.
It can be done by using the following command.
  sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

Step 9
  The final step is to install Docker and we can do this with the following command -
   sudo apt-get install -y docker -engine


No comments:

Post a Comment

Popular Articles