File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,8 +38,11 @@ RUN pip install --no-cache-dir --target workspace /opt/distro/*.whl -r requireme
3838
3939FROM ${IMAGE}:${IMAGE_VERSION}
4040
41- COPY --from=build /operator-build/workspace /autoinstrumentation
42- COPY --from=build-musl /operator-build/workspace /autoinstrumentation-musl
41+ COPY --chown=65532:65532 --from=build /operator-build/workspace /autoinstrumentation
42+ COPY --chown=65532:65532 --from=build-musl /operator-build/workspace /autoinstrumentation-musl
43+
44+ # Use wolfi's "nonroot" user/group to satisfy k8s runAsNonRoot security policies.
45+ USER 65532:65532
4346
4447RUN chmod -R go+r /autoinstrumentation
4548RUN chmod -R go+r /autoinstrumentation-musl
Original file line number Diff line number Diff line change @@ -17,4 +17,7 @@ FROM python:3.12-alpine3.22@sha256:f6973b8f9395204414a7f25d99a50ba1c7306064771d1
1717
1818COPY --from=build /operator-build/workspace /autoinstrumentation
1919
20+ # Use "nobody" user, to mimic the non-root "nonroot" user/group used in Dockerfile.
21+ USER 65534:65534
22+
2023RUN chmod -R go+r /autoinstrumentation
You can’t perform that action at this time.
0 commit comments