Writing your first dockerfile to run test automation framework from docker

Praveen David Mathew
4 min readSep 6, 2021

We already covered how to install wsl2 and enable network connectivity in it.

Now lets see how to run WebdriverIO tests in WSL space

Read it here:

Now lets see how to run the same in WSL ( Linux ubuntu)

  1. Enable loop back interface:

this is disabled , we have to enable it because chromedriver runs in localhost (loopback)

sudo ifup lo

Note:if you get ifup command not found then install it as :

sudo apt-get update -ysudo apt-get install -y ifupdown

2. Now we need some pre-requisite for chromedriver and chrome to work:

sudo apt-get update -y && \apt-get install -y gconf-service libasound2 libatk1.0–0 libc6 libcairo2 libcups2 \libdbus-1–3 libexpat1 libfontconfig1 libgcc1 libgconf-2–4 \

--

--

Praveen David Mathew
Praveen David Mathew

Written by Praveen David Mathew

An open source advocator/WebdriverIO Projectcommiter/Postman Supernova/Postman-html-extra contributor/Stack overflow sqa moderator/Speaker