# Issue while launching k6 via Docker

**URL:** <https://community.grafana.com/t/issue-while-launching-k6-via-docker/96435>\
**Category:** Grafana k6\
**Created:** [June 24, 2022, 10:43am UTC](https://community.grafana.com/t/issue-while-launching-k6-via-docker/96435 "2022-06-24T10:43:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sugam](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@Sugam](https://community.grafana.com/u/Sugam)\
**Post date:** [June 24, 2022, 10:43am UTC](https://community.grafana.com/t/issue-while-launching-k6-via-docker/96435/1 "2022-06-24T10:43:40Z")

</div>

I am facing the issue while launching k6 via Docker.

Please find below the logs:-

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/0/02a05bc5dd140abe175c0ca4a8ded7e77e93c7c6.png)

---

<div class="post-metadata">

**Author:** ![olegbespalov](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/olegbespalov/32/36739_2.png) [@olegbespalov](https://community.grafana.com/u/olegbespalov)\
**Post date:** [June 24, 2022, 12:40pm UTC](https://community.grafana.com/t/issue-while-launching-k6-via-docker/96435/2 "2022-06-24T12:40:34Z")

</div>

Hi @Sugam !

Welcome to the community forums! 👋

It seems like it’s not the issue with the k6 or the k6 in docker, as the error says it looks like a syntaxis issue in the script.

I’d recommend checking if it works without k6 (plain javascript).

Hope that answers,  
Cheers!

---

<div class="post-metadata">

**Author:** ![Sugam](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@Sugam](https://community.grafana.com/u/Sugam)\
**Post date:** [June 24, 2022, 3:20pm UTC](https://community.grafana.com/t/issue-while-launching-k6-via-docker/96435/3 "2022-06-24T15:20:22Z")

</div>

As per my project, I follow below steps to run k6 scenario:-

1. I execute npm install to get the dependencies.
2. I execute npm run build so that app.bundle.js is formed
3. Then I execute k6 script.

I have two scenarios -

1. When I execute the above steps at my local (windows - where node and k6 are installed) without using Docker - It works
2. When I execute the above steps at my local (WSL) with Docker - It gives the error  
Please note that I have used below Docker file with multistage build:-

FROM node:16 AS node  
ADD ./k6 /usr/app/k6  
WORKDIR /usr/app/k6  
RUN npm install  
RUN npm run build

FROM loadimpact/k6:latest  
COPY --from=node /usr/app/k6 /go/src/

I first execute npm install and npm run build in node image, copies the app.bundle.js in k6 container and then executing the k6 script in k6 conatiner.

Do yo think it can be an issue as I generate app.bundle.js in node container and executing it in k6 container?

---

<div class="post-metadata">

**Author:** ![mstoykov](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/mstoykov/32/35309_2.png) [@mstoykov](https://community.grafana.com/u/mstoykov)\
**Post date:** [June 29, 2022, 1:42pm UTC](https://community.grafana.com/t/issue-while-launching-k6-via-docker/96435/4 "2022-06-29T13:42:56Z")

</div>

Hi @Sugam can you tell us what your dependancies are and where does this regex come from?
