Create a Docker Network Kodekloud

 

 

 


Question: The Nautilus DevOps team needs to set up several docker environments for different applications. One of the team members has been assigned a ticket where he has been asked to create some docker networks to be used later. Complete the task based on the following ticket description:

 a. Create a docker network named as ecommerce on App Server 2 in Stratos 

 b. Configure it to use macvlan drivers.

 c. Set it to use subnet 172.168.0.0/24 and iprange 172.168.0.2/24.

 

Solution:

Login to mentioned server

ssh steve@stapp02

Login as root

sudo su

Create the docker network

docker network create -d macvlan --subnet=172.168.0.0/24 --ip-range=172.168.0.2/24 ecommerce 

Check the network

docker network ls

docker network inspect ecommerce

Download Coding Interview Book and Get More Tutorials for Coding and Interview Solution: Click Here

Download System Design Interview Book and Get More Tutorials and Interview Solution: Click Here

Do you need more Guidance or Help? Then Book 1:1 Quick Call with Me: Click Here

Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment