Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
9 changes: 1 addition & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 0 additions & 17 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" && \
Expand Down Expand Up @@ -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 && \
Expand Down
Loading