Skip to content

Instantly share code, notes, and snippets.

@luketn
Created August 8, 2020 02:07
Show Gist options
  • Save luketn/83e3ba3cef91a534b06178692149331f to your computer and use it in GitHub Desktop.
Save luketn/83e3ba3cef91a534b06178692149331f to your computer and use it in GitHub Desktop.
Docker file to install K6 and set up a NodeJS app to run.
FROM node:14.7.0
#Install K6
WORKDIR /tmp
ADD https://github.com/loadimpact/k6/releases/download/v0.27.1/k6-v0.27.1-linux64.tar.gz /tmp/k6-v0.27.1-linux64.tar.gz
RUN tar -xzf k6-v0.27.1-linux64.tar.gz
RUN mv k6-v0.27.1-linux64/k6 /usr/bin/k6
#Install NPM dependencies
COPY loadtest-home /loadtest-home
WORKDIR /loadtest-home
RUN npm ci
ENTRYPOINT node index.js
@Ratnesh1104
Copy link

What would be inside index.js?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment