File tree Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,22 @@ jobs:
39
39
- run : pip install pip-licenses
40
40
- run : pip-licenses
41
41
42
- operator-requirements-installable :
42
+ operator-image-buildable :
43
43
runs-on : ubuntu-latest
44
44
steps :
45
45
- uses : actions/checkout@v4
46
46
- uses : ./.github/actions/env-install
47
- - run : pip install .
48
- - run : pip install -r operator/requirements.txt
47
+ - run : pip install build
48
+ - run : python -m build
49
+ - name : Set up Docker Buildx
50
+ uses : docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
51
+ - name : Log in to the Elastic Container registry
52
+ uses : docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
53
+ with :
54
+ registry : ${{ secrets.ELASTIC_DOCKER_REGISTRY }}
55
+ username : ${{ secrets.ELASTIC_DOCKER_USERNAME }}
56
+ password : ${{ secrets.ELASTIC_DOCKER_PASSWORD }}
57
+ - run : docker build -f operator/Dockerfile --build-arg DISTRO_DIR=./dist .
49
58
50
59
test :
51
60
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -16,8 +16,26 @@ RUN mkdir workspace
16
16
17
17
RUN pip install --no-cache-dir --target workspace /opt/distro/*.whl -r requirements.txt
18
18
19
+ FROM python:3.12-alpine AS build-musl
20
+
21
+ ARG DISTRO_DIR
22
+
23
+ COPY ${DISTRO_DIR} /opt/distro
24
+
25
+ WORKDIR /operator-build
26
+
27
+ ADD operator/requirements.txt .
28
+
29
+ RUN mkdir workspace
30
+
31
+ RUN apk add gcc python3-dev musl-dev linux-headers
32
+
33
+ RUN pip install --no-cache-dir --target workspace /opt/distro/*.whl -r requirements.txt
34
+
19
35
FROM docker.elastic.co/wolfi/chainguard-base:latest@sha256:90888b190da54062f67f3fef1372eb0ae7d81ea55f5a1f56d748b13e4853d984
20
36
21
37
COPY --from=build /operator-build/workspace /autoinstrumentation
38
+ COPY --from=build-musl /operator-build/workspace /autoinstrumentation-musl
22
39
23
40
RUN chmod -R go+r /autoinstrumentation
41
+ RUN chmod -R go+r /autoinstrumentation-musl
You can’t perform that action at this time.
0 commit comments