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:
3939 - run : pip install pip-licenses
4040 - run : pip-licenses
4141
42- operator-requirements-installable :
42+ operator-image-buildable :
4343 runs-on : ubuntu-latest
4444 steps :
4545 - uses : actions/checkout@v4
4646 - 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 .
4958
5059 test :
5160 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -16,8 +16,26 @@ RUN mkdir workspace
1616
1717RUN pip install --no-cache-dir --target workspace /opt/distro/*.whl -r requirements.txt
1818
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+
1935FROM docker.elastic.co/wolfi/chainguard-base:latest@sha256:90888b190da54062f67f3fef1372eb0ae7d81ea55f5a1f56d748b13e4853d984
2036
2137COPY --from=build /operator-build/workspace /autoinstrumentation
38+ COPY --from=build-musl /operator-build/workspace /autoinstrumentation-musl
2239
2340RUN 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