Introduction to Docker
Welcome again to our DevOps series. Let us dive into Docker.
Why do we need docker
Imagine,an application works in developers' laptop but not in testing or production .This is due to difference in computing environment between Dev,Test and Prod
The idea behind microservices is that some types of applications become easier to build and maintain when they are broken down into smaller, compostable pieces which work together.Each components is developed separately,and the applications is then simply the sum of its constituent components.
What exactly is Docker containers
Docker is a tool designed to make it easier to create,deploy and run applications by using Containers
Docker Containers are lightweight alternatives to Virtual machines and it uses the host OS.
You don't have to pre-allocate any RAM in containers.
Docker in a nutshell
1.docker file builds Docker image and that image contains all the project's code
You can run that image to create as many docker containers.
Docker helps us to build,run and ship applications.
Containers vs Virtual machines
Containers is an isolated environment for running an application while virtual machine is an abstraction of a machine (physical hardware).
How industries are utilizing Docker
Problems being faced before docker
1.companies used custom scripts in order to to deploy applications to various VMs.
Their environment was optimized for their legacy Java-based applications.
Companies wanted to improve the way they architect applications,by moving to a microservices based architecture for their applications.
Security for sensitive data such as SSNs and student health data.
How Docker solved all this problems
Docker Data center
1.Management Universal Control Plane
2.security LDAP
3.Orchestration
Docker helps companies in managing whole cluster from a single place.Services are deployed using UCP web UI,using Docker images that are stored in DTR.
2.About security,The role based access controls within DDC allows companies to access and define users access to various teams.
Docker Registry
Docker registry is a storage component for docker images.
Images can be in either Public/private repositories.
Docker hub is Docker's very own cloud repository.
Why use Docker registries
Control where your images are being stored
Integrate image storage with your in-house development workflow.
Docker Images
These are read only templates that are used to create Containers
Built by Docker Users
Stored in docker hub or your local registry.
Docker Containers
Isolated Application platform
Contains everything needed to run the applications
Built from One or More images.
Practical Part of Docker
Let's get dirty with Docker
Installing Docker
Got to docs.docker.com/get-docker
You will get instructions o how to install docker.
N.B make sure docker engine is running before continuing
Development workflows using Docker
To start off we take an application, doesn't matter the kind of application,and dockerize it.
This is done by just adding a file to it.
A docker file is a plaintext file that includes instructions that docker uses to package this application into an image,we discussed about an image before.