What is Docker? How to Deploy and Install Redis in Docker
- Mr. Shailesh Sakaria
- Radhik Bhojani
If you’re a programmer or techie, you have setup for all your need software in your machine. So it difficult, all software needed depending OS and run applications. Now you can install the only docker and run all need applications in docker without depending os and also docker you can install on Windows, Linux, Mac, Cloud, Serverless, etc. so now you have all question what is docker?
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Now in your mind say what is the container?
A container is a standard unit of software that packages up a code and all its dependencies so the application runs quickly and reliably from one computing environment to another.
“In a way, Docker is a bit like a virtual machine. But unlike a virtual machine, rather than creating a whole virtual operating system, Docker allows applications to use the same Linux kernel as the system that they’re running on and only requires applications be shipped with things not already running on the host computer. This gives a significant performance boost and reduces the size of the application.”

Difference Between Docker and VM (Virtual Machine)


Containers
Virtual Machines
Docker, The Good Things
- 1. Fast Boot:Takes seconds to start a container, so you need to restart or deploy new versions, your new instance is up in second.
- 2. The container uses less Resource:since you don’t have a full OS and they all share the same kernel, they are lightweight.
- 3. The containers are small better than VM:They start from then of Megabytes Up, Where VMs start from Gigabytes. so you current server can host way more container.
Supported platform
Installation
Terminology
- 1. Image — the basic element for every container. When you create an image, every step is cached and can be reused. Depending on the image, it can take some time to build. Containers, on the other hand, can be started from images right away.
- 2. Container — a running instance that encapsulates the required software. Containers are always created from images. A container can expose ports and volumes to interact with other containers or/and the outer world.
- 3. Port — a TCP/UDP port in its original meaning. To keep things simple, let’s assume that ports can be exposed to the outer world.
- 4. Volume — can be described as a shared folder. Volumes are initialized when a container is created. Volumes are designed to persist data, independent of the container’s lifecycle.
Example 1. Redis Install in Docker
It’s time to run your first container:
“First Pull Image in Docker:
docker pull redis
Check List Of Images Command:
docker images”

- Start a Redis instance: docker run –name redisContainer -d redis — name : name of container -d : it is image name you pull in docker.
- Alternate add Port to access outside of container:
docker run –name redisContainer -p 6379:6379 -d redis
-p: add port number you can access out side of container
Connection in Your Computer:
