Skip to content

Commit

Permalink
Merge pull request #315 from docksal/develop
Browse files Browse the repository at this point in the history
Release 3.7.0
  • Loading branch information
lmakarov committed Feb 9, 2024
2 parents 4530223 + 32a38a8 commit a88caa0
Show file tree
Hide file tree
Showing 32 changed files with 120 additions and 475 deletions.
49 changes: 26 additions & 23 deletions .github/workflows/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,27 @@ jobs:
-
platform: linux/amd64
arch: amd64
version: '8.0'
version: '8.1'
-
platform: linux/amd64
arch: amd64
version: '8.1'
version: '8.2'
-
platform: linux/amd64
arch: amd64
version: '8.2'
version: '8.3'
-
platform: linux/arm64
arch: arm64
version: '8.0'
version: '8.1'
-
platform: linux/arm64
arch: arm64
version: '8.1'
version: '8.2'
-
platform: linux/arm64
arch: arm64
version: '8.2'
version: '8.3'

env:
ARCH: ${{ matrix.arch }}
Expand All @@ -64,7 +64,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Environment variables
run: |
Expand Down Expand Up @@ -92,14 +92,14 @@ jobs:
docker info
-
name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
# Build and cache image in the registry
name: Build image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: ${{ env.BUILD_DIR }}
file: ${{ env.BUILD_DIR }}/Dockerfile
Expand All @@ -123,27 +123,27 @@ jobs:
-
platform: linux/amd64
arch: amd64
version: '8.0'
version: '8.1'
-
platform: linux/amd64
arch: amd64
version: '8.1'
version: '8.2'
-
platform: linux/amd64
arch: amd64
version: '8.2'
version: '8.3'
-
platform: linux/arm64
arch: arm64
version: '8.0'
version: '8.1'
-
platform: linux/arm64
arch: arm64
version: '8.1'
version: '8.2'
-
platform: linux/arm64
arch: arm64
version: '8.2'
version: '8.3'

env:
ARCH: ${{ matrix.arch }}
Expand All @@ -158,7 +158,7 @@ jobs:
bats-version: '1.3.0'
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Environment variables
run: |
Expand Down Expand Up @@ -201,10 +201,12 @@ jobs:
# Dynamic variable names cannot be used when mapping step outputs to job outputs.
# Step outputs cannot be accessed directly from other jobs. Dead end.
- name: Store test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-results
name: test-results-${{ env.GIT_SHA7 }}-${{ env.VERSION_PREFIX }}${{ env.VERSION }}-${{ env.ARCH }}
path: ${{ github.workspace }}/test-results-*.txt
if-no-files-found: error
overwrite: true

push:
name: "Push: ${{ matrix.version }}/multi"
Expand All @@ -217,9 +219,9 @@ jobs:
strategy:
matrix:
version:
- '8.0'
- '8.1'
- '8.2'
- '8.3'

env:
VERSION_PREFIX: php
Expand All @@ -228,7 +230,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Environment variables
run: |
Expand All @@ -239,15 +241,16 @@ jobs:
-
# Login to Docker Hub
name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Retrieve test results
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: test-results
pattern: test-results-${{ env.GIT_SHA7 }}-*
merge-multiple: true
-
# Generate persistent tags (edge, stable, release)
name: Docker image tags
Expand Down
140 changes: 23 additions & 117 deletions 8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.1.25-fpm-bullseye as cli
FROM php:8.1.27-fpm-bookworm as cli

ARG TARGETARCH
ARG DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -28,16 +28,6 @@ RUN set -xe; \
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LC_ALL en_US.utf8

# Enable additional repos
RUN set -xe; \
sed -i 's/main/main contrib non-free/' /etc/apt/sources.list; \
# blackfire.io repo
curl -fsSL https://packages.blackfire.io/gpg.key | apt-key add -; \
echo "deb https://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list; \
# git-lfs repo
curl -fsSL https://packagecloud.io/github/git-lfs/gpgkey | apt-key add -; \
echo 'deb https://packagecloud.io/github/git-lfs/debian bullseye main' | tee /etc/apt/sources.list.d/github_git-lfs.list;

# Additional packages
RUN set -xe; \
# Create man direcotries, otherwise some packages may not install (e.g. postgresql-client)
Expand Down Expand Up @@ -140,14 +130,13 @@ RUN set -xe; \
apt-get update >/dev/null; \
apt-get -y --no-install-recommends install >/dev/null \
$buildDeps \
blackfire-php \
libc-client2007e \
libfreetype6 \
libgpgme11 \
libicu67 \
libicu72 \
libjpeg62-turbo \
libldap-2.4-2 \
libmagickcore-6.q16-*-extra \
libldap-2.5-0 \
libmagickcore-6.q16-6-extra \
libmagickwand-6.q16-6 \
libmemcached11 \
libmemcachedutil2 \
Expand Down Expand Up @@ -199,7 +188,7 @@ RUN set -xe; \
imagick \
memcached \
redis \
ssh2-beta \
ssh2 \
xdebug \
xhprof \
;\
Expand All @@ -219,11 +208,9 @@ RUN set -xe; \

# MSSQL PHP client
RUN set -xe; \
# Repo for msodbcsql18 (MS ODBC driver), required by pecl/sqlsrv and pecl/pdo_sqlsrv
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add -; \
# TODO: Using Ubuntu 22.04 packages as a temporary fix (until addressed upstream in MS repos).
#curl -fsSL https://packages.microsoft.com/config/debian/11/prod.list -o /etc/apt/sources.list.d/mssql.list; \
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/prod.list -o /etc/apt/sources.list.d/mssql.list; \
# Repo and key for msodbcsql18 (MS ODBC driver), required by pecl/sqlsrv and pecl/pdo_sqlsrv
curl -fsSL https://packages.microsoft.com/config/debian/12/prod.list -o /etc/apt/sources.list.d/mssql.list; \
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg; \
\
buildDeps=" \
unixodbc-dev \
Expand Down Expand Up @@ -253,16 +240,16 @@ RUN set -xe; \
ENV \
COMPOSER_DEFAULT_VERSION=2 \
COMPOSER_VERSION=1.10.27 \
COMPOSER2_VERSION=2.6.5 \
COMPOSER2_VERSION=2.7.0 \
DRUSH_VERSION=8.4.12 \
DRUPAL_CONSOLE_LAUNCHER_VERSION=1.9.7 \
WPCLI_VERSION=2.9.0 \
BLACKFIRE_VERSION=2.10.0 \
PLATFORMSH_CLI_VERSION=4.10.4 \
ACQUIA_CLI_VERSION=2.18.0 \
TERMINUS_VERSION=3.2.2 \
JQ_VERSION=1.7 \
YQ_VERSION=4.35.2
# platformsh/legacy-cli
PLATFORMSH_CLI_VERSION=4.14.1 \
ACQUIA_CLI_VERSION=2.22.1 \
TERMINUS_VERSION=3.3.3 \
JQ_VERSION=1.7.1 \
YQ_VERSION=4.40.5
RUN set -xe; \
# Composer 1.x
curl -fsSL "https://github.com/composer/composer/releases/download/${COMPOSER_VERSION}/composer.phar" -o /usr/local/bin/composer1; \
Expand All @@ -274,10 +261,6 @@ RUN set -xe; \
curl -fsSL "https://github.com/hechoendrupal/drupal-console-launcher/releases/download/${DRUPAL_CONSOLE_LAUNCHER_VERSION}/drupal.phar" -o /usr/local/bin/drupal; \
# Wordpress CLI
curl -fsSL "https://github.com/wp-cli/wp-cli/releases/download/v${WPCLI_VERSION}/wp-cli-${WPCLI_VERSION}.phar" -o /usr/local/bin/wp; \
# Blackfire CLI
# Find out the most recent version number:
# curl -X GET -Is https://blackfire.io/api/v1/releases/cli/linux/amd64 | grep location | awk '{print $2}'
curl -fsSL "https://packages.blackfire.io/binaries/blackfire/${BLACKFIRE_VERSION}/blackfire-linux_${TARGETARCH}" -o /usr/local/bin/blackfire; \
# Platform.sh CLI
curl -fsSL "https://github.com/platformsh/legacy-cli/releases/download/v${PLATFORMSH_CLI_VERSION}/platform.phar" -o /usr/local/bin/platform; \
# Acquia CLI
Expand All @@ -291,7 +274,7 @@ RUN set -xe; \
# Set Default Composer Version
ln -s /usr/local/bin/composer${COMPOSER_DEFAULT_VERSION} /usr/local/bin/composer; \
# Make all downloaded binaries executable in one shot
(cd /usr/local/bin && chmod +x composer1 composer2 drush8 drupal wp blackfire platform acli terminus jq yq);
(cd /usr/local/bin && chmod +x composer1 composer2 drush8 drupal wp platform acli terminus jq yq);

# Install Python 3 + pip from Debian repos
RUN set -xe; \
Expand Down Expand Up @@ -342,8 +325,9 @@ $HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibil

# Node.js (installed as user)
ENV \
NVM_VERSION=0.39.5 \
NODE_VERSION=18.17.0 \
NVM_VERSION=0.39.7 \
NODE_VERSION=20.11.0 \
# yarn releases above 1.22.19 don't install
YARN_VERSION=1.22.19
# Don't use -x here, as the output may be excessive
RUN set -e; \
Expand All @@ -356,52 +340,6 @@ RUN set -e; \
export YARN_PROFILE="$HOME/.profile"; \
curl -fsSL https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION} >/dev/null

## Ruby (installed as user) via rvm
## Note: Disabled. rvm + its build dependecies bloat the image (~80MB)
## Debian 11 ships with Ruby 2.7, so we'll stick with that by default.
## It is still possible for the end user to switch to a different Ruby version via rvm.
#ENV \
# RVM_VERSION_INSTALL=1.29.10 \
# RUBY_VERSION_INSTALL=2.7.2
## Don't use -x here, as the output may be excessive
#RUN set -e; \
# # Export ruby gem bin path
# echo 'export PATH=$PATH:$(ruby -r rubygems -e "puts Gem.user_dir")/bin' >> $HOME/.profile; \
# . $HOME/.profile; \
# # Public GPG servers are not realiable, so downloading keys from rvm.io instead.
# #gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
# # Import and trust rvm keys
# # mpapis@gmail.com
# curl -sSL https://rvm.io/mpapis.asc | gpg --batch --import -; \
# echo 409B6B1796C275462A1703113804BB82D39DC0E3:6: | gpg --batch --import-ownertrust; \
# # piotr.kuczynski@gmail.com
# curl -sSL https://rvm.io/pkuczynski.asc | gpg --batch --import -; \
# echo 7D2BAF1CF37B13E2069D6956105BD0E739499BDB:6: | gpg --batch --import-ownertrust; \
# \
# echo 'rvm_autoupdate_flag=0' >> $HOME/.rvmrc; \
# echo 'rvm_silence_path_mismatch_check_flag=1' >> $HOME/.rvmrc; \
# curl -fsSL https://raw.githubusercontent.com/rvm/rvm/${RVM_VERSION_INSTALL}/binscripts/rvm-installer | bash -s -- --ignore-dotfiles --version ${RVM_VERSION_INSTALL}; \
# { \
# echo ''; \
# echo 'export PATH="$PATH:$HOME/.rvm/bin"'; \
# echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"'; \
# } >> $HOME/.profile; \
# # Reload $HOME/.profile to apply settings for the current shell
# . $HOME/.profile; \
# \
# # rvm.io does not currently have ruby binaries for Debian 9, so Ruby is compiled from source, which requires a bunch
# # of extra dependencies installed (rvm installs these automatically), which bloat this image:
# # rvm/ruby required packages: gawk, automake, bison, libffi-dev, libgdbm-dev, libncurses5-dev, libsqlite3-dev, libtool, libyaml-dev, sqlite3, zlib1g-dev, libgmp-dev, libreadline-dev, libssl-dev
# rvm install ruby-${RUBY_VERSION_INSTALL}; \
# rvm use ruby-${RUBY_VERSION_INSTALL} --default; \
# \
# gem install --user-install bundler; \
# # Have bundler install gems locally (./.bundle) by default
# echo -e "\n"'export BUNDLE_PATH=.bundle' >> $HOME/.profile; \
# \
# rvm cleanup all; \
# rvm gemset globalcache enable

## Ruby bundler
## Don't use -x here, as the output may be excessive
RUN set -e; \
Expand All @@ -412,38 +350,6 @@ RUN set -e; \
# Have bundler install gems in the current directory (./.bundle) by default
echo -e "\n"'export BUNDLE_PATH=.bundle' >> $HOME/.profile

# Python (installed as user) via pyenv
# Note: Disabled. pyenv + its build dependecies bloat the image (~300MB).
# Debian 10 ships with Python 3.7, so we'll stick with that by default.
# It is still possible for the end user to switch to a different python version via pyenv.
#ENV \
# PYENV_VERSION_INSTALL=1.2.21 \
# PYTHON_VERSION_INSTALL=3.8.3
#RUN set -xe; \
# # pyenv requires a bunch of build dependencies installed, which would bloat this image
# # See https://github.com/pyenv/pyenv/wiki/Common-build-problems#prerequisites
# sudo apt-get update >/dev/null; \
# sudo apt-get -y --no-install-recommends install >/dev/null \
# build-essential libssl-dev zlib1g-dev libbz2-dev \
# libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
# xz-utils tk-dev libffi-dev liblzma-dev python-openssl git \
# ;\
# # Cleanup
# sudo apt-get clean; sudo rm -rf /var/lib/apt/lists/*; \
# \
# git clone --depth 1 -b v${PYENV_VERSION_INSTALL} https://github.com/pyenv/pyenv.git $HOME/.pyenv; \
# rm -rf $HOME/.pyenv/.git; \
# { \
# echo ''; \
# echo 'export PYENV_ROOT="$HOME/.pyenv"'; \
# echo 'export PATH="$PYENV_ROOT/bin:$PATH"'; \
# echo 'eval "$(pyenv init -)"'; \
# } >> $HOME/.profile; \
# # Reload $HOME/.profile to apply settings for the current shell
# . $HOME/.profile; \
# pyenv install ${PYTHON_VERSION_INSTALL}; \
# pyenv global ${PYTHON_VERSION_INSTALL}

# Notify web container about started fin exec
RUN echo '(/opt/ping-web.sh &)' >> $HOME/.profile

Expand Down Expand Up @@ -508,9 +414,9 @@ USER docker
ARG HOME=/home/docker

ENV \
CODE_SERVER_VERSION=4.10.1 \
VSCODE_GITLENS_VERSION=13.2.2 \
VSCODE_XDEBUG_VERSION=1.32.0 \
CODE_SERVER_VERSION=4.20.1 \
VSCODE_GITLENS_VERSION=14.7.0 \
VSCODE_XDEBUG_VERSION=1.34.0 \
VSCODE_HOME="${HOME}/code-server"

# Install code-server
Expand All @@ -526,7 +432,7 @@ COPY --chown=docker:docker config/code-server ${VSCODE_HOME}
# Note: Have to use --user-data-dir with --install-extension instead of --config
RUN set -xe; \
code-server --user-data-dir=${VSCODE_HOME} --install-extension eamodio.gitlens@${VSCODE_GITLENS_VERSION}; \
code-server --user-data-dir=${VSCODE_HOME} --install-extension felixfbecker.php-debug@${VSCODE_XDEBUG_VERSION}
code-server --user-data-dir=${VSCODE_HOME} --install-extension xdebug.php-debug@${VSCODE_XDEBUG_VERSION}

# Switch back to root (IMPORTANT!)
USER root
3 changes: 0 additions & 3 deletions 8.1/config/php/zz-php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,3 @@ sendmail_path = '/usr/bin/msmtp -t --host=mail --port=1025 --from=docker@cli'
; Extention settings
[opcache]
opcache.memory_consumption = 128
[blackfire]
blackfire.agent_socket = 'tcp://blackfire:8307'
blackfire.apm_enabled = 0
Loading

0 comments on commit a88caa0

Please sign in to comment.