Skip to content

Commit 511ea23

Browse files
committed
ci: use chainguard latest image when building in CI
So that we can run CI without having access to the Elastic docker registry.
1 parent 6d6b827 commit 511ea23

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,7 @@ jobs:
4848
- run: python -m build
4949
- name: Set up Docker Buildx
5050
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
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 .
51+
- run: docker build -f operator/Dockerfile --build-arg PYTHON_GLIBC_IMAGE=cgr.dev/chainguard/python --build-arg PYTHON_GLIBC_IMAGE_VERSION=latest --build-arg DISTRO_DIR=./dist --build-arg IMAGE=cgr.dev/chainguard/busybox --build-arg IMAGE_VERSION=latest .
5852

5953
test:
6054
runs-on: ubuntu-latest

operator/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
FROM docker.elastic.co/wolfi/python:3.12-dev@sha256:2f10787cc037b197f6a5d1a031c31706ae59642708c8b3b5ddfd3fa79605e9ad AS build
1+
ARG PYTHON_GLIBC_IMAGE="docker.elastic.co/wolfi/python"
2+
ARG PYTHON_GLIBC_IMAGE_VERSION="3.12-dev@sha256:2f10787cc037b197f6a5d1a031c31706ae59642708c8b3b5ddfd3fa79605e9ad"
3+
4+
FROM ${IMAGE}:${IMAGE_VERSION} AS build
25

36
ENV LANG=C.UTF-8
47
ENV PYTHONDONTWRITEBYTECODE=1
@@ -32,7 +35,10 @@ RUN apk add gcc g++ python3-dev musl-dev linux-headers
3235

3336
RUN pip install --no-cache-dir --target workspace /opt/distro/*.whl -r requirements.txt
3437

35-
FROM docker.elastic.co/wolfi/chainguard-base:latest@sha256:26caa6beaee2bbf739a82e91a35173892dfe888d0a744b9e46cdc19a90d8656f
38+
ARG IMAGE="docker.elastic.co/wolfi/chainguard-base"
39+
ARG IMAGE_VERSION="latest@sha256:26caa6beaee2bbf739a82e91a35173892dfe888d0a744b9e46cdc19a90d8656f"
40+
41+
FROM ${IMAGE}:${IMAGE_VERSION}
3642

3743
COPY --from=build /operator-build/workspace /autoinstrumentation
3844
COPY --from=build-musl /operator-build/workspace /autoinstrumentation-musl

0 commit comments

Comments
 (0)