@@ -6,21 +6,22 @@ FROM docksal/cli:${CLI_VERSION}
66# See https://github.com/hadolint/hadolint/wiki/DL4006
77SHELL ["/bin/bash" , "-o" , "pipefail" , "-c" ]
88
9+ ARG TARGETARCH
910ARG HELM_VERSION=v2.17.0
1011# Args defined before the FROM directive are not available in the build stage,
1112# so cannot test CLI_VERSION directly here.
1213ARG INSTALL_SQLITE=false
1314
1415# Install kubectl and helm client
15- RUN curl -o /usr/local/bin/kubectl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/$(dpkg --print-architecture) /kubectl" && \
16+ RUN curl -o /usr/local/bin/kubectl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/${TARGETARCH} /kubectl" && \
1617 chmod +x /usr/local/bin/kubectl && \
1718 curl -o ./install_helm.sh https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get && \
1819 chmod +x ./install_helm.sh && \
1920 ./install_helm.sh -v ${HELM_VERSION} && \
2021 helm init --client-only
2122
2223# Also install helm3 as `helm3`
23- RUN curl -s https://get.helm.sh/helm-v3.6.2-linux-"$(dpkg --print-architecture)" .tar.gz | sudo tar -C /tmp --no-same-owner -xvzf - linux-"$(dpkg --print-architecture)" /helm --strip-components 1 && \
24+ RUN curl -s https://get.helm.sh/helm-v3.6.2-linux-${TARGETARCH} .tar.gz | sudo tar -C /tmp --no-same-owner -xvzf - linux-${TARGETARCH} /helm --strip-components 1 && \
2425 mv /tmp/helm /bin/helm3
2526
2627# Install Kustomize
@@ -39,19 +40,21 @@ RUN curl https://awscli.amazonaws.com/awscli-exe-linux-"$(uname -m)".zip -o "aws
3940
4041# Install yq
4142# https://mikefarah.gitbook.io/yq/#wget
42- RUN wget https://github.com/mikefarah/yq/releases/download/v4.21.1/yq_linux_"$(dpkg --print-architecture)" .tar.gz -O - |\
43- tar xz && mv yq_linux_"$(dpkg --print-architecture)" /usr/bin/yq
43+ RUN wget https://github.com/mikefarah/yq/releases/download/v4.21.1/yq_linux_${TARGETARCH} .tar.gz -O - |\
44+ tar xz && mv yq_linux_${TARGETARCH} /usr/bin/yq
4445
4546# Upgrade SQLite 3.x if specified in the build args.
4647# @see https://www.drupal.org/project/drupal/issues/3346338
48+ # @see https://github.com/ddev/ddev/blob/a82397976cb06a440b23a81a474ceda13a428ae1/containers/ddev-webserver/Dockerfile#L124
4749# @see https://github.com/docksal/service-cli/pull/327/files
48- # Need to get sqlite3 from the Debian testing repository as the default version is too old.
50+ # Using the DDEV method since it doesn't have the side effects of the Docksal method.
51+ ARG SQLITE_VERSION="3.45.1"
4952RUN if [ "$INSTALL_SQLITE" = "true" ]; then \
50- set -xe ; \
51- echo " deb https://deb .debian.org/debian testing main" | tee /etc/apt/sources.list.d/testing.list ; \
52- apt-get update >/dev/null ; \
53- apt-get install -y -t testing sqlite3; \
54- apt-get clean; rm -rf /var/lib/apt/lists/* ; \
53+ mkdir -p /tmp/sqlite3 ; \
54+ wget -O /tmp/sqlite3/sqlite3. deb https://snapshot .debian.org/archive/ debian/20240203T152533Z/pool/ main/s/sqlite3/sqlite3_${SQLITE_VERSION}-1_${TARGETARCH}.deb ; \
55+ wget -O /tmp/sqlite3/libsqlite3.deb https://snapshot.debian.org/archive/debian/20240203T152533Z/pool/main/s/sqlite3/libsqlite3-0_${SQLITE_VERSION}-1_${TARGETARCH}.deb ; \
56+ apt-get install -y /tmp/ sqlite3/*.deb ; \
57+ rm -rf /tmp/sqlite3 ; \
5558fi
5659
5760# Install expect, vim
0 commit comments