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://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69 RUN echo "deb https://dl.k6.io/deb stable main" | tee /etc/apt/sources.list.d/k6.list RUN apt-get update RUN apt-get install k6 COPY ./app /test WORKDIR /test RUN npm install CMD [ "node", "run-k6-test.js" ]