-
Notifications
You must be signed in to change notification settings - Fork 25
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
Run agent + chromium as non-root user #965
base: main
Are you sure you want to change the base?
Conversation
d4f4cf2
to
c92087a
Compare
c92087a
to
19f8d0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking a stab at this! Left a small comment about multi-layering.
Dockerfile
Outdated
ADD --chmod=0555 https://github.com/grafana/xk6-sm/releases/download/v0.0.3-pre/sm-k6-${TARGETOS}-${TARGETARCH} /usr/local/bin/sm-k6 | ||
COPY dist/${HOST_DIST}/synthetic-monitoring-agent /usr/local/bin/synthetic-monitoring-agent | ||
COPY scripts/pre-stop.sh /usr/local/lib/synthetic-monitoring-agent/pre-stop.sh | ||
RUN apk --no-cache add libcap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be extracted to a separate stage, so we don't end up with libcap
on the final image (or have the need to apk del
it).
See as an example this: https://github.com/grafana/sm-k6-runner/blob/6f1c47c5a1760aa4dd7e5ad301297b1f8e2ae65b/Dockerfile#L24
Caps stick with the file so it can be COPY
ed just fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, thanks for the suggestion!
As usual, it depends on what we consider part of our API. Let me answer with a question: If you try to run the new image, both in Docker and K8s, with the
I'm not aware of any other way, but I may be wrong here :)
Yes, that is "expected". |
Closes #847
This might be a little naive, please keep me honest. cc @mem @nadiamoe
Looking for feedback on the following
Confirm: version this as a breaking change?Q about k8ssecurityContext
at the bottom of this description.Summary:
release
andwith-browser
build targets of the Dockerfile.scratch
/tarball-based images to do the same.K8s securityContext
Here's the toy YAML that I used to run this in my local cluster:
The issue with this
securityContext
:Is that if I uncomment
allowPrivilegeEscalation: false
then I run into the following error:Which, I guess, is from the default behaviour of listening on
localhost:4050
for the/metrics
endpoint?