Custom docker image that can run k6 and nodejs script

Hello everyone.

I am trying to build a custom image that can run both a nodejs script and k6. My initial idea was to have node as a base image and then proceed to install k6 on it. Has anyone been able to do this? Or is there any other approach I should take?

Any help would be appreciated!

Edit: Was able to make it work like this:

FROM --platform=linux/amd64 node:lts-gallium

RUN apt-key adv --keyserver hkp:// --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69
RUN echo "deb stable main" | tee /etc/apt/sources.list.d/k6.list
RUN apt-get update
RUN apt-get install k6

COPY ./app /test


RUN npm install

CMD [ "node", "run-k6-test.js" ]

Hello @rc123 and welcome to the community :tada:
To run k6 you need to have Go installed as well, so first I would suggest you go after Golang installation, then you install k6 on-top of it.
To get an idea how to achieve your goal I would also recommend checking k6 Dockerfile