January 8, 2021 / Nirav Shah
Docker Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you can create and start all the services from your configuration.
Step 1: First we Download and Install Docker Compose
curl -L https://github.com/docker/compose/releases/download/1.24.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
Step 2: Change Permissions
chmod +x /usr/local/bin/docker-compose
Step 3: Check Docker Compose version
docker-compose --version
Let see how to use compose the file with an example.
Fist first let’s see how docker file look like.
version: "3.8"
services:
web:
build:
ports:
- "5000:5000"
volumes:
- .:/code
- logvolume01:/var/log
links:
- redis
redis:
image: redis
volumes:
logvolume01: {}
And save it docker-compose.yml
And hit the below command
#docker-compose up -d
And your Redis is running in port number 5000. To read more on Docker Compose, visit the Documentation Page.

Nirav Shah is the Director of Eternal Web Pvt Ltd, an AWS Advanced Consulting Partner and certified Odoo Partner based in the UK. With over a decade of experience in cloud computing, digital transformation, and ERP implementation, Nirav helps enterprises adopt the right technology to solve complex business challenges. He specialises in AWS infrastructure, Odoo ERP, and web development solutions for businesses across the UK and beyond.
Have queries about your project idea or concept? Please drop in your project details to discuss with our AWS Global Cloud Infrastructure service specialists and consultants.