From db1f2a7df383f395bd0c86d083f8c7a04a8543d4 Mon Sep 17 00:00:00 2001 From: Ilia Mochalov Date: Tue, 24 Oct 2023 16:17:19 +0800 Subject: [PATCH] feat: add musl build to python autoinstrumentation --- autoinstrumentation/python/Dockerfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/autoinstrumentation/python/Dockerfile b/autoinstrumentation/python/Dockerfile index 9a6dfa7403..8060032e3c 100644 --- a/autoinstrumentation/python/Dockerfile +++ b/autoinstrumentation/python/Dockerfile @@ -17,8 +17,18 @@ ADD requirements.txt . RUN mkdir workspace && pip install --target workspace -r requirements.txt +FROM python:3.11-alpine AS build-musl + +WORKDIR /operator-build + +ADD requirements.txt . + +RUN apk add --update --no-cache gcc musl-dev linux-headers +RUN mkdir workspace && pip install --target workspace -r requirements.txt + FROM busybox -COPY --from=build /operator-build/workspace /autoinstrumentation +COPY --from=build /operator-build/workspace /autoinstrumentation/linux-x64 +COPY --from=build-musl /operator-build/workspace /autoinstrumentation/linux-musl-x64 RUN chmod -R go+r /autoinstrumentation