wp-kaniko-sync/Dockerfile

29 lines
804 B
Docker

# שלב 1: בניית כלים
FROM alpine:3.19 as builder
RUN apk add --no-cache bash git yq curl
# הורדת 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"
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]