ci: build images with kaniko inside the job image
The runner does not expose its Docker socket to job containers, so the image job could not run docker build. Include the kaniko executor in the CI image and build/push directly from the job; docker login only writes the registry credentials file. Bump the CI image tag to 2.
This commit is contained in:
1 parent
4c6f1c8fe8
commit
a0434d974f
3 files changed
+22
-14
No files matched your search
@@ -2,6 +2,8 @@
|
||||
# workflows do not download a JDK or install packages on every run.
|
||||
#
|
||||
# Build and push it with scripts/build-ci-image.sh.
|
||||
FROM gcr.io/kaniko-project/executor:v1.23.2-debug AS kaniko
|
||||
|
||||
FROM gradle:8.14.3-jdk21
|
||||
|
||||
ARG NODE_VERSION=22.14.0
|
||||
@@ -42,6 +44,9 @@ RUN curl -fsSL "https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz" \
|
||||
&& rm -rf /tmp/helm.tgz /tmp/linux-amd64 \
|
||||
&& helm version --short
|
||||
|
||||
# Build images inside the job container without a Docker daemon.
|
||||
COPY --from=kaniko /kaniko/executor /usr/local/bin/kaniko-executor
|
||||
|
||||
ENV GRADLE_USER_HOME=/root/.gradle \
|
||||
JAVA_HOME=/opt/java/openjdk
|
||||
|
||||
|
||||
Reference in new issue
Block a user