diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index b035388..5ac0e40 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -88,7 +88,6 @@ jobs: file: ./src/Dockerfile build-args: | CLI_VERSION=php${{ matrix.version }} - INSTALL_SQLITE=${{ matrix.version >= '8.3' }} platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.prep.outputs.tags }} diff --git a/build.sh b/build.sh index e6b5813..8ed88ca 100755 --- a/build.sh +++ b/build.sh @@ -5,11 +5,4 @@ set -ex # Arguments: $1 CLI_VERSION CLI_VERSION=${1:-8.4} -# Install SQLite 3.x for Drupal 11 testing if CLI version >= 8.3 -INSTALL_SQLITE=false -# Use the `bc` calculator to compare the PHP version number. -if [ "$(echo "${CLI_VERSION} >= 8.3" | bc -l)" -eq 1 ]; then - INSTALL_SQLITE=true -fi - -docker build --build-arg CLI_VERSION=php"$CLI_VERSION" --build-arg INSTALL_SQLITE="$INSTALL_SQLITE" -t phase2/docker-cli:php"$CLI_VERSION" ./src +docker build --build-arg CLI_VERSION=php"$CLI_VERSION" -t phase2/docker-cli:php"$CLI_VERSION" ./src diff --git a/src/Dockerfile b/src/Dockerfile index b32f6ea..1b1c3c4 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -8,9 +8,6 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG TARGETARCH ARG HELM_VERSION=v2.17.0 -# Args defined before the FROM directive are not available in the build stage, -# so cannot test CLI_VERSION directly here. -ARG INSTALL_SQLITE=false # Install kubectl and helm client 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" && \ @@ -43,20 +40,6 @@ RUN curl https://awscli.amazonaws.com/awscli-exe-linux-"$(uname -m)".zip -o "aws RUN wget https://github.com/mikefarah/yq/releases/download/v4.21.1/yq_linux_${TARGETARCH}.tar.gz -O - |\ tar xz && mv yq_linux_${TARGETARCH} /usr/bin/yq -# Upgrade SQLite 3.x if specified in the build args. -# @see https://www.drupal.org/project/drupal/issues/3346338 -# @see https://github.com/ddev/ddev/blob/a82397976cb06a440b23a81a474ceda13a428ae1/containers/ddev-webserver/Dockerfile#L124 -# @see https://github.com/docksal/service-cli/pull/327/files -# Using the DDEV method since it doesn't have the side effects of the Docksal method. -ARG SQLITE_VERSION="3.45.1" -RUN if [ "$INSTALL_SQLITE" = "true" ]; then \ - mkdir -p /tmp/sqlite3; \ - wget -O /tmp/sqlite3/sqlite3.deb https://snapshot.debian.org/archive/debian/20240203T152533Z/pool/main/s/sqlite3/sqlite3_${SQLITE_VERSION}-1_${TARGETARCH}.deb; \ - wget -O /tmp/sqlite3/libsqlite3.deb https://snapshot.debian.org/archive/debian/20240203T152533Z/pool/main/s/sqlite3/libsqlite3-0_${SQLITE_VERSION}-1_${TARGETARCH}.deb; \ - apt-get install -y /tmp/sqlite3/*.deb; \ - rm -rf /tmp/sqlite3; \ -fi - # Install expect, vim RUN apt-get clean && \ apt update && \