Skip to content

Commit

Permalink
[minor] Updated alpine to 3.19.1
Browse files Browse the repository at this point in the history
- Custom nodejs package to support code-server.
- Update imagemagick / leptonica.
- PHP/FPM 8.3
  • Loading branch information
nigelgbanks committed Mar 29, 2024
1 parent 95ecba3 commit 03449b2
Show file tree
Hide file tree
Showing 26 changed files with 1,942 additions and 1,899 deletions.
41 changes: 24 additions & 17 deletions code-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# syntax=docker/dockerfile:1.5.1
FROM nodejs
FROM drupal

ARG TARGETARCH
Expand All @@ -11,6 +12,17 @@ ARG GLIBC_SHA256="276f43ce9b2d5878422bca94ca94e882a7eb263abe171d233ac037201ffcaf
EXPOSE 8443 \
9003

RUN --mount=type=cache,id=code-server-apk-${TARGETARCH},sharing=locked,target=/var/cache/apk \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
download.sh \
--url "${GLIBC_URL}" \
--sha256 "${GLIBC_SHA256}" \
&& \
apk add "${DOWNLOAD_CACHE_DIRECTORY}/${GLIBC_FILE}" && \
mkdir /lib64 && \
ln -s /lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 && \
cleanup.sh

RUN --mount=type=bind,source=rootfs/var/lib/nginx/.composer,target=/composer \
--mount=type=cache,id=code-server-composer-${TARGETARCH},sharing=locked,target=/var/lib/nginx/.composer/cache \
mkdir -p /var/lib/nginx/.composer && \
Expand All @@ -22,40 +34,35 @@ RUN --mount=type=bind,source=rootfs/var/lib/nginx/.composer,target=/composer \
# Include commonly used tools and xdebug.
# PHPStorm remote requries Glibc.
RUN --mount=type=cache,id=code-server-apk-${TARGETARCH},sharing=locked,target=/var/cache/apk \
--mount=type=bind,from=nodejs,source=/packages,target=/packages \
--mount=type=bind,from=nodejs,source=/etc/apk/keys,target=/etc/apk/keys \
apk add \
/packages/nodejs-*.apk \
alpine-sdk \
docker-cli \
htop \
nodejs \
krb5-dev \
openssh \
parallel \
php82-pecl-xdebug \
php83-pecl-xdebug \
python3 \
spdlog \
sudo \
unison \
yarn \
&& \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
download.sh \
--url "${GLIBC_URL}" \
--sha256 "${GLIBC_SHA256}" \
&& \
apk add "${DOWNLOAD_CACHE_DIRECTORY}/${GLIBC_FILE}" && \
mkdir /lib64 && \
ln -s /lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 && \
cleanup.sh

RUN --mount=type=cache,id=code-server-npm-${TARGETARCH},sharing=locked,target=/usr/local/share/.cache/yarn \
yarn global add [email protected] && \
FORCE_NODE_VERSION=18 yarn global add --ignore-engines --unsafe-perm \
@microsoft/[email protected].9 \
code-server@4.11.0 \
[email protected].8 \
yarn global add --ignore-engines --unsafe-perm \
@microsoft/1ds-core-js@^3.2.13 \
code-server@4.22.1 \
minimist@^1.2.6 \
[email protected] \
spdlog@0.13.7 \
yauzl@2.10.0 \
yazl@2.5.1 \
@vscode/spdlog@^0.15.0 \
yauzl@^2.9.2 \
yazl@^2.4.3 \
&& \
cleanup.sh

Expand Down
4 changes: 2 additions & 2 deletions code-server/rootfs/etc/confd/templates/drupal.fpm.conf.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Allow for toggling between xdebug / production configured fpm.
set $fpm php-fpm82;
set $fpm php-fpm83;
if ($cookie_XDEBUG_SESSION) {
set $fpm xdebug;
}
Expand Down Expand Up @@ -37,5 +37,5 @@ location ~ '\.php$|^/update.php' {
fastcgi_buffers 16 800k;
fastcgi_buffer_size 1600k;
# PHP 8 socket location.
fastcgi_pass unix:/var/run/$fpm/php-fpm82.sock;
fastcgi_pass unix:/var/run/$fpm/php-fpm83.sock;
}
6 changes: 3 additions & 3 deletions code-server/rootfs/etc/s6-overlay/s6-rc.d/xdebug/run
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ mkdir -p /run/xdebug

XDEBUG_FLAGS=$(</var/run/s6/container_environment/XDEBUG_FLAGS)

exec /usr/sbin/php-fpm82 \
--pid /var/run/xdebug/php-fpm82.pid \
exec /usr/sbin/php-fpm83 \
--pid /var/run/xdebug/php-fpm83.pid \
--prefix /var/run/xdebug \
--fpm-config /etc/php82/php-fpm.conf \
--fpm-config /etc/php83/php-fpm.conf \
-d "php_admin_value[zend_extension]=xdebug.so" \
-d "zend_extension=xdebug.so" \
"${XDEBUG_FLAGS[@]}"
2 changes: 1 addition & 1 deletion crayfish/rootfs/etc/nginx/http.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ server {
}

location ~ ^/index\.php(/|$) {
fastcgi_pass unix:/var/run/php-fpm82/php-fpm82.sock;
fastcgi_pass unix:/var/run/php-fpm83/php-fpm83.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;

Expand Down
Loading

0 comments on commit 03449b2

Please sign in to comment.