Skip to content

Commit

Permalink
fixup! Update Dockerfiles for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
morganchristiansson committed Jan 8, 2022
1 parent dea709f commit 38dcee7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt-get update \
ARG TARGETARCH
ARG HELM_VERSION="v3.7.2"
ARG HELM_LOCATION="https://get.helm.sh"
ARG HELM_FILENAME="helm-${HELM_VERSION}-linux-amd64.tar.gz"
ARG HELM_FILENAME="helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz"

RUN set -x && \
wget ${HELM_LOCATION}/${HELM_FILENAME}.sha256sum && \
Expand All @@ -22,19 +22,19 @@ RUN set -x && \
echo "Verifying ${HELM_FILENAME}..." && \
sha256sum "${HELM_FILENAME}" | grep -q "${HELM_SHA256}" && \
echo "Extracting ${HELM_FILENAME}..." && \
tar zxvf "${HELM_FILENAME}" && mv /linux-amd64/helm /usr/local/bin/ && \
rm ${HELM_FILENAME} && rm -r /linux-amd64
tar zxvf "${HELM_FILENAME}" && mv /linux-${TARGETARCH}/helm /usr/local/bin/ && \
rm ${HELM_FILENAME} && rm -r /linux-${TARGETARCH}

# using the install documentation found at https://kubernetes.io/docs/tasks/tools/install-kubectl/
# for now but in a future version of alpine (in the testing version at the time of writing)
# we should be able to install using apk add.
# the sha256 sum can be found at https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl.sha256
# the sha256 sum can be found at https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl.sha256
# maybe a good idea to automate in the future?
ENV KUBECTL_VERSION="v1.21.4"
RUN set -x && \
curl --retry 5 --retry-connrefused -LO "https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl.sha256" && \
KUBECTL_SHA256=$(cat kubectl.sha256) && \
wget "https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \
wget "https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl" && \
sha256sum kubectl | grep ${KUBECTL_SHA256} && \
chmod +x kubectl && \
mv kubectl /usr/local/bin/kubectl
Expand All @@ -43,10 +43,10 @@ ENV KUSTOMIZE_VERSION="v3.8.8"
RUN set -x && \
curl --retry 5 --retry-connrefused -LO https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/${KUSTOMIZE_VERSION}/checksums.txt && \
KUSTOMIZE_SHA256=$(grep kustomize_${KUSTOMIZE_VERSION}_linux_${TARGETARCH}.tar.gz checksums.txt | awk '{print $1}') && \
curl --retry 5 --retry-connrefused -LO https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz && \
sha256sum kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz | grep ${KUSTOMIZE_SHA256} && \
tar zxf kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz && \
rm kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz && \
curl --retry 5 --retry-connrefused -LO https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_${TARGETARCH}.tar.gz && \
sha256sum kustomize_${KUSTOMIZE_VERSION}_linux_${TARGETARCH}.tar.gz | grep ${KUSTOMIZE_SHA256} && \
tar zxf kustomize_${KUSTOMIZE_VERSION}_linux_${TARGETARCH}.tar.gz && \
rm kustomize_${KUSTOMIZE_VERSION}_linux_${TARGETARCH}.tar.gz && \
mv kustomize /usr/local/bin/kustomize

RUN helm plugin install https://github.com/databus23/helm-diff --version v3.2.0 && \
Expand Down

0 comments on commit 38dcee7

Please sign in to comment.