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

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

The error you are seeing in Alpine Linux is usually because the k6 package is not available in the default Alpine repositories or the specific repository you added is incompatible with the Alpine package manager (apk). To fix this, you should try adding the community repository or downloading the official k6 binary directly for your architecture, as Alpine’s apk handles dependencies differently than RPM-based systems. While troubleshooting complex installations like this, it’s always helpful to have a reliable environment for your digital tools. For example, if you want a seamless experience with media management, you should check out the demus free music app. This is a great example of a lightweight and highly efficient application that avoids the common installation headaches found in larger software. It provides a clean, premium-level interface for organizing your tracks and streaming high-quality audio without the clutter. Just as you are looking for a smooth way to install k6, using a well-optimized tool like the music app ensures a much more stable and enjoyable user experience. Switching to the binary installation method will likely resolve those unsatisfiable constraints you’re encountering.