Skip to content

Commit

Permalink
feat: Install some extensions by default
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Feb 21, 2024
1 parent 992ab45 commit dab8926
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 deletions.
16 changes: 4 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ FROM composer:$COMPOSER_VERSION as local-composer
FROM php:$PHP_VERSION-fpm-alpine$ALPINE_VERSION as base
WORKDIR /app

COPY --from=mlocati/php-extension-installer:2.2.2 /usr/bin/install-php-extensions /usr/bin/

RUN <<EOT
set -eux
apk add --no-cache bash fcgi gettext git jq nginx s6 su-exec
apk add --no-cache bash fcgi gettext git jq nginx postgresql-client s6 su-exec
install-php-extensions bcmath calendar exif intl pcntl opcache pgsql pdo_pgsql redis zip
cd "$PHP_INI_DIR"
sed -ri -e 's/^(access.log)/;\1/' ../php-fpm.d/docker.conf
sed -ri \
Expand Down Expand Up @@ -83,9 +86,7 @@ RUN <<EOT
fi
EOT

COPY --from=mlocati/php-extension-installer:2.2.2 /usr/bin/install-php-extensions /usr/bin/
COPY --from=ghcr.io/roadrunner-server/roadrunner:2023.3.11 /usr/bin/rr /usr/local/bin/rr

COPY rootfs/ /

CMD ["s6-svscan", "/etc/services.d"]
Expand Down Expand Up @@ -120,21 +121,12 @@ ONBUILD ARG SKIP_BUILD
ONBUILD ARG DEPS
ONBUILD ARG INSTALL

ONBUILD ARG INSTALL_BCMATH
ONBUILD ARG INSTALL_CALENDAR
ONBUILD ARG INSTALL_EXIF
ONBUILD ARG INSTALL_GD
ONBUILD ARG INSTALL_IMAGICK
ONBUILD ARG INSTALL_INTL
ONBUILD ARG INSTALL_PCNTL
ONBUILD ARG INSTALL_MOSQUITTO
ONBUILD ARG INSTALL_MYSQL
ONBUILD ARG INSTALL_OPCACHE
ONBUILD ARG INSTALL_PGSQL
ONBUILD ARG INSTALL_REDIS
ONBUILD ARG INSTALL_SQLSRV
ONBUILD ARG INSTALL_XDEBUG
ONBUILD ARG INSTALL_ZIP

ONBUILD ARG NGINX_ROOT
ONBUILD ARG NGINX_EXPIRES
Expand Down
16 changes: 0 additions & 16 deletions rootfs/usr/bin/clevyr-build
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,11 @@ log() {
printf '%s: %s\n' "$(basename "$0")" "$@" >&2
}

# Convert old dependency args to new format with defaults
if [ "$INSTALL_BCMATH" != "false" ]; then
unset INSTALL_BCMATH
export INSTALL="$INSTALL bcmath"
fi

if [ "$INSTALL_MYSQL" = "true" ]; then
unset INSTALL_MYSQL
export INSTALL="$INSTALL mysqli pdo_mysql"
fi

if [ "$INSTALL_OPCACHE" != "false" ]; then
unset INSTALL_OPCACHE
export INSTALL="$INSTALL opcache"
fi

if [ "$INSTALL_PGSQL" != "false" ]; then
unset INSTALL_PGSQL
export INSTALL="$INSTALL pgsql pdo_pgsql"
fi

if [ "$INSTALL_SQLSRV" = "true" ]; then
unset INSTALL_SQLSRV
export INSTALL="$INSTALL sqlsrv pdo_sqlsrv"
Expand Down

0 comments on commit dab8926

Please sign in to comment.