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: Multi-stage builds | Docker Documentation

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

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

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