Create a dockerfiles for base a helmfile
This commit is contained in:
parent
9e23345df9
commit
6c0a535831
@ -4,7 +4,6 @@ RUN apk update && apk add --no-cache gcc musl-dev
|
|||||||
COPY ./ .
|
COPY ./ .
|
||||||
RUN cargo build --release
|
RUN cargo build --release
|
||||||
|
|
||||||
|
|
||||||
FROM alpine:3.17.1
|
FROM alpine:3.17.1
|
||||||
COPY --from=builder /src/target/release/cdh /bin/cdh
|
COPY --from=builder /src/target/release/cdh /bin/cdh
|
||||||
WORKDIR /workdir
|
WORKDIR /workdir
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
FROM alpine:3.17.1
|
|
||||||
ARG HELM_VERSION=3.10.3
|
|
||||||
ARG HELMFILE_VERSION=0.150.0
|
|
||||||
|
|
||||||
ARG HELM_LINK=https://get.helm.sh/helm-v$HELM_VERSION-linux-$PLATFORM.tar.gz
|
|
||||||
ARG HELMFILE_LINK=https://github.com/helmfile/helmfile/releases/download/v$HELMFILE_VERSION/helmfile_$HELMFILE_VERSION_linux_\$PLATFORM.tar.gz
|
|
||||||
|
|
||||||
RUN apk update && apk add --no-cache curl
|
|
||||||
COPY ./scripts /tmp
|
|
||||||
RUN echo "installing helm from ${HELM_LINK}"
|
|
||||||
ENV HELM_ARCHIVE_PATH=/tmp/helm.tar.gz
|
|
||||||
RUN /tmp/download_for_arch.sh $HELM_LINK $HELM_ARCHIVE_PATH
|
|
||||||
RUN tar -zxvf $HELM_ARCHIVE_PATH
|
|
||||||
RUN echo $HELMFILE_LINK
|
|
||||||
|
|
||||||
CMD ["sh"]
|
|
@ -1,16 +1,16 @@
|
|||||||
FROM alpine:3.17.1
|
FROM ghcr.io/allanger/clever-install as builder
|
||||||
ARG HELM_VERSION=3.10.3
|
RUN apk update && apk add tar
|
||||||
ARG HELMFILE_VERSION=0.150.0
|
ARG HELM_VERSION=v3.10.3
|
||||||
|
ARG HELMFILE_VERSION=v0.144.0
|
||||||
|
ENV RUST_LOG=info
|
||||||
|
RUN clin -l "https://github.com/roboll/helmfile/releases/download/{{ version }}/helmfile_{{ os }}_{{ arch }}" -i /tmp/helmfile -p $HELMFILE_VERSION
|
||||||
|
RUN clin -l "https://get.helm.sh/helm-{{ version }}-{{ os }}-{{ arch }}.tar.gz" -i /tmp/helm.tar.gz -p $HELM_VERSION
|
||||||
|
RUN tar -xf /tmp/helm.tar.gz -C /tmp && rm -f /tmp/helm.tar.gz
|
||||||
|
RUN mkdir /out && for bin in `find /tmp | grep helm`; do cp $bin /out/; done
|
||||||
|
RUN chmod +x /out/helm
|
||||||
|
RUN chmod +x /out/helmfile
|
||||||
|
|
||||||
ARG HELM_LINK=https://get.helm.sh/helm-v$HELM_VERSION-linux-\$PLATFORM.tar.gz
|
FROM check-da-helm-base
|
||||||
ARG HELMFILE_LINK=https://github.com/helmfile/helmfile/releases/download/v$HELMFILE_VERSION/helmfile_$HELMFILE_VERSION_linux_\$PLATFORM.tar.gz
|
COPY --from=builder /out/ /usr/bin
|
||||||
|
RUN apk update --no-cache && apk add --no-cache jq bash
|
||||||
RUN apk update && apk add --no-cache curl
|
ENTRYPOINT ["cdh"]
|
||||||
|
|
||||||
RUN echo "installing helm from ${HELM_LINK}"
|
|
||||||
ENV HELM_ARCHIVE_PATH=/tmp/helm.tar.gz
|
|
||||||
RUN curl -LJO $HELM $HELM_ARCHIVE_PATH
|
|
||||||
RUN tar -zxvf $HELM_ARCHIVE_PATH
|
|
||||||
RUN echo $HELMFILE_LINK
|
|
||||||
|
|
||||||
CMD ["sh"]
|
|
||||||
|
Reference in New Issue
Block a user