k6

Trying to install k6 in alpine linux container, failing miserably

Hi, I am trying to install K6 in an alpine linux container. Using apk add on ‘bintray-loadimpact-rpm.repo’ is failing.

ERROR: unsatisfiable constraints:’
k6 (missing):
required by: world[k6]

I think it is missing something.

Please help.

I am not very familiar with Alpine linux, but I don’t think you can install .rpm packages in it - they are meant for things like Fedora, CentOS, RHEL, etc. linux distributions. We don’t have an official package for Alpine, although we have an official docker container based on it:

Is there any way i can merge my docker container with the K6 one? So that the final docker container has both jenkins and K6 in it.

Yes, you can use multi-stage dockerfiles and use our official docker image as one of the build stages, and then COPY the pre-built k6 binary from it to your actual Docker image: https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds

FROM loadimpact/k6:latest AS k6official
// ... 

FROM ... // whatever your jenkins image is
// ...
COPY --from=k6official /usr/bin/k6 /usr/bin/k6

Thanks a lot @nedyalko This suggestion helped me through the issue.