diff --git a/Dockerfile b/Dockerfile index 19f76c8..306e173 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,24 @@ -FROM alpine:3.19 +# שלב 1: בניית כלים +FROM alpine:3.19 as builder -# התקנת כלים שאתה צריך RUN apk add --no-cache bash git yq curl -# הורדת Kaniko למיקום יציב -RUN curl -sSL -o /usr/local/bin/kaniko \ - https://github.com/GoogleContainerTools/kaniko/releases/download/v1.21.0/executor && \ - chmod +x /usr/local/bin/kaniko +# הורדת Kaniko בינארי +RUN curl -sSL -o /kaniko \ + https://github.com/GoogleContainerTools/kaniko/releases/download/v1.20.1/executor && \ + chmod +x /kaniko + +# שלב 2: בניית פלאגין סופי על בסיס woodpeckerci/plugin-kaniko +FROM woodpeckerci/plugin-kaniko:latest + +USER root + +# העתקת הכלים מה-builder +COPY --from=builder /kaniko /usr/local/bin/kaniko +COPY --from=builder /bin/bash /bin/bash +COPY --from=builder /usr/bin/git /usr/bin/git +COPY --from=builder /usr/bin/yq /usr/bin/yq +COPY --from=builder /usr/bin/curl /usr/bin/curl ENV PATH="/usr/local/bin:$PATH"