File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 33set -ex
44
55# Arguments: $1 CLI_VERSION
6- docker build --build-arg CLI_VERSION=php" ${1:- 8.0} " -t phase2/docker-cli:php" ${1:- 8.0} " ./src
6+ CLI_VERSION=${1:- 8.3}
7+
8+ # Install SQLite 3.x for Drupal 11 testing if CLI version >= 8.3
9+ INSTALL_SQLITE=false
10+ if [ " $( echo " ${CLI_VERSION} >= 8.3" | bc -l) " -eq 1 ]; then
11+ INSTALL_SQLITE=true
12+ fi
13+
14+ docker build --build-arg CLI_VERSION=php" $CLI_VERSION " --build-arg INSTALL_SQLITE=" $INSTALL_SQLITE " -t phase2/docker-cli:php" $CLI_VERSION " ./src
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ FROM docksal/cli:${CLI_VERSION}
77SHELL ["/bin/bash" , "-o" , "pipefail" , "-c" ]
88
99ARG HELM_VERSION=v2.17.0
10+ # Args defined before the FROM directive are not available in the build stage.
11+ ARG INSTALL_SQLITE=false
1012
1113# Install kubectl and helm client
1214RUN 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" && \
@@ -44,12 +46,11 @@ RUN wget https://github.com/mikefarah/yq/releases/download/v4.21.1/yq_linux_"$(d
4446# @see https://github.com/docksal/service-cli/pull/327/files
4547# Use the `bc` calculator to compare the PHP version number, removing the `php` prefix.
4648# Need to get sqlite3 from the Debian testing repository as the default version is too old.
47- RUN if [ "$(echo " ${CLI_VERSION#php} >= 8.3 " | bc -l)" -eq 1 ]; then \
49+ RUN if [ "$INSTALL_SQLITE" = "true" ]; then \
4850 set -xe; \
4951 echo "deb https://deb.debian.org/debian testing main" | tee /etc/apt/sources.list.d/testing.list; \
5052 apt-get update >/dev/null; \
5153 apt-get install -y -t testing sqlite3; \
52- # Cleanup
5354 apt-get clean; rm -rf /var/lib/apt/lists/*; \
5455fi
5556
You can’t perform that action at this time.
0 commit comments