Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K6 Docker Image: update-ca-certificates not found on release 0.49.0, working fine on 0.48.0 #3582

Closed
reinhartbuit opened this issue Feb 1, 2024 · 2 comments
Assignees
Labels
awaiting user waiting for user to respond

Comments

@reinhartbuit
Copy link

reinhartbuit commented Feb 1, 2024

Brief summary

I currently create a custom Docker Image where I copy .crt files into the container and then finally it runs 'update-ca-certificates'. I have been using the docker image grafana/k6:0.48.0 and did not encounter any issues.

I now changed the docker file to use grafana/k6:0.49.0 instead, and now I get /bin/sh: update-ca-certificates: not found.

`FROM grafana/k6:0.49.0

USER root

COPY certs/xxxxx.crt /usr/local/share/ca-certificates/ixxxxx.capi.crt
RUN update-ca-certificates

COPY test /test

USER 1000

EXPOSE 6565

ENV TZ="Africa/Johannesburg"

ENTRYPOINT ["k6", "run"]`

k6 version

0.49.0

OS

macOS

Docker version and image (if applicable)

grafana/k6:0.49.0

Steps to reproduce the problem

  1. Create DockerFile with contents:

`FROM grafana/k6:0.48.0

USER root

COPY certs/xxxxxx.crt /usr/local/share/ca-certificates/xxxxxx.crt
RUN update-ca-certificates

COPY test /test

USER 1000

EXPOSE 6565

ENV TZ="Africa/Johannesburg"

ENTRYPOINT ["k6", "run"]`

  1. Run command: 'docker build .'

  2. Build is successful.

  3. Change the Docker file FROM to 0.49.0 instead of 0.48.0

  4. Run command: 'docker build.

Expected behaviour

Docker build to be successful

Actual behaviour

[5/6] RUN update-ca-certificates:
0.197 /bin/sh: update-ca-certificates: not found

@joanlopez
Copy link
Contributor

joanlopez commented Feb 1, 2024

Hey @reinhartbuit,

I guess that's because after this commit, the k6 Docker image no longer has ca-certificates installed by default.

So, in order to get it back working, since v0.49.0, you'll need to slightly modify your Dockerfile, from:

RUN update-ca-certificates

to:

RUN apk add --no-cache ca-certificates && \
    update-ca-certificates

Can you try with that, please?

Thanks!

@joanlopez joanlopez added awaiting user waiting for user to respond and removed bug triage labels Feb 1, 2024
@reinhartbuit
Copy link
Author

Thank you. That makes sense.
Yes it worked, thanks for the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting user waiting for user to respond
Projects
None yet
Development

No branches or pull requests

2 participants