Add docker images #5

Merged
allanger merged 21 commits from refs/pull/5/head into main 2023-02-14 21:16:34 +00:00
3 changed files with 15 additions and 32 deletions
Showing only changes of commit 6c0a535831 - Show all commits

View File

@ -4,7 +4,6 @@ RUN apk update && apk add --no-cache gcc musl-dev
COPY ./ .
RUN cargo build --release
FROM alpine:3.17.1
COPY --from=builder /src/target/release/cdh /bin/cdh
WORKDIR /workdir

View File

@ -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"]

View File

@ -1,16 +1,16 @@
FROM alpine:3.17.1
ARG HELM_VERSION=3.10.3
ARG HELMFILE_VERSION=0.150.0
FROM ghcr.io/allanger/clever-install as builder
RUN apk update && apk add tar
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
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
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"]
FROM check-da-helm-base
COPY --from=builder /out/ /usr/bin
RUN apk update --no-cache && apk add --no-cache jq bash
ENTRYPOINT ["cdh"]