Analytics Vidhya
Published in

Analytics Vidhya

Deploy Your First Docker Container — Part 1

Step 1 : Running A Container

The first task is to identify the name of the Docker Image which is configured to run Redis. With Docker, all containers are started based on a Docker Image. These images contain everything required to launch the process; the host doesn’t require any configuration or dependencies.

Jane can find existing images at or by using the command

docker search <name>

For example, to find an image for Redis, you would use docker search redis.

Using the search command, Jane has identified that the Redis Docker Image is called redis and wants to run the latest release. Because Redis is a database, Jane wants to run it as a background service while she continues to work.

To complete this step, launch a container in the background running an instance of Redis based on the official image.

The Docker CLI has a command called run which will start a container based on a Docker Image. The structure is

docker run <options> <image-name>

By default, Docker will run a command in the foreground. To run in the background, the option -d needs to be specified.

docker run -d redis

By default, Docker will run the latest version available. If a particular version was required, it could be specified as a tag, for example, version 3.2 would be

docker run -d redis:3.2

As this is the first time Jane is using the Redis image, it will be downloaded onto the Docker Host machine.

Step 2 , We’ll continue in Part II




Analytics Vidhya is a community of Analytics and Data Science professionals. We are building the next-gen data science ecosystem

Recommended from Medium

Deploying a simple “Hello world” httpd container on an ECS cluster

#freestockphoto (Sunday 29th 02AM)

2021 12/08

Using Google Cloud VM As Jenkins Build Agent

Breaking down the Twitter Profile Screen Part I: Stretchy Header (iOS Swift 4)

Links to Study


Subdomain enumeration with — Knock

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kajal Rawal

Kajal Rawal

Programming isn’t about what you know; it’s about what you can figure out.

More from Medium

Automate Deploying Java API Docker Image on AWS App Runner through CloudFormation

GitLab Django Cloud Run — How To Properly Stand Back and Relax

Setup Master Slave Replication with MySQL

How To Deploy Nuxt Js App On Docker Swarm Cluster