Home / Blogs / Article

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!

← Back to all blogs