Create Multiple Chrome browser containers using docker compose

Tutorial 31​​ ​​ Create multiple chrome browser docker containers using​​ Docker​​ Compose

Please read the previous article before reading this one.

In this article, we will​​ learn​​ how to create multiple chrome browser​​ containers​​ using docker compose.

Let us cd to directory where we have placed .yml file

Start docker engine by double clicking docker desktop icon

Wait for the docker engine to start,​​ the below command shows that​​ no containers are running​​ at present

We still have 4 docker images in our local

Open the yml file​​ and notice that the browser name is ‘chrome’


We have to use the same name in the below command​​ to​​ create 2 chrome containers​​ docker-compose up --scale chrome=2 -d

Notice below that 2 chrome containers are created

Also notice below that 2 chrome containers are running

Launch​​ http://localhost:4444​​ 

Notice below that 2 chrome browsers are running

docker-compose down​​ to stop containers

Notice that none of the containers are running now

Let us now create 3 firefox browser containers. The yml file has the name ‘firefox’

So​​ let us create 3 firefox browser containers

Notice below that 3 firefox containers are running

Refresh​​ http://localhost:4444

Notice below that 3 firefox browsers are running​​ 

So this is how we can create multiple chrome/ff/edge sessions using docker compose.

Execute docker-compose down to stop the running containers

Thank you for reading!

Share On

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp
Share on tumblr
Share on email

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top

Lifetime Membership Club

LIFETIME MEMBERSHIP BIG SALE - ALL LIVE COURES JUST - 7000 RS/ 99 USD
Attend All Live courses in just 7000 rs / $99 - offer ends 1st Nov 2024