Skip to content
Merged
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
2 changes: 1 addition & 1 deletion base-images/src/alpine-base/.devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"x-build": {
"name": "Alpine",
"image-name": "alpine-base",
"image-version": "1.11.0"
"image-version": "1.12.0"
},
"remoteUser": "vscode"
}
10 changes: 5 additions & 5 deletions base-images/src/alpine-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM alpine:3.22.2@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412
FROM alpine:3.23.3@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659

ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=${USER_UID}

ENV CONTAINER_USER ${USERNAME}
ENV CONTAINER_USER=${USERNAME}

RUN apk add --no-cache \
runit \
Expand Down Expand Up @@ -55,8 +55,8 @@ RUN \
echo "${USERNAME} ALL=(root) NOPASSWD:ALL" > "/etc/sudoers.d/${USERNAME}" && \
chmod 0440 "/etc/sudoers.d/${USERNAME}"

ENV CHARSET UTF-8
ENV LANG C.UTF-8
ENV LC_COLLATE C
ENV CHARSET=UTF-8
ENV LANG=C.UTF-8
ENV LC_COLLATE=C

ENTRYPOINT ["/usr/local/bin/runit-wrapper"]
4 changes: 2 additions & 2 deletions features/src/php/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "php",
"name": "PHP",
"description": "Installs PHP into the Dev Environment",
"version": "2.9.0",
"version": "2.10.0",
"documentationURL": "https://github.com/Automattic/vip-codespaces/tree/trunk/features/src/php",
"options": {
"version": {
Expand Down Expand Up @@ -44,7 +44,7 @@
"settings": {
"intelephense.environment.documentRoot": "/wp",
"intelephense.environment.includePaths": ["/wp"],
"intelephense.environment.phpVersion": "8.1.0",
"intelephense.environment.phpVersion": "8.3.0",
"intelephense.stubs": [
"apcu", "bcmath", "calendar", "Core", "ctype", "curl", "date", "dom", "exif", "fileinfo", "filter", "fpm", "ftp", "gd", "gmagick", "gmp",
"hash", "iconv", "igbinary", "intl", "json", "libxml", "mbstring", "memcache", "memcached", "meta", "mysqli", "newrelic", "openssl",
Expand Down
30 changes: 11 additions & 19 deletions features/src/php/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ setup_php82_alpine() {
php82-xml \
php82-xmlreader \
php82-xmlwriter \
php82-zip ${EXTENSIONS}
php82-zip ${EXTENSIONS} -X https://dl-cdn.alpinelinux.org/alpine/v3.22/community

if [ "${SKIP_GMAGICK}" != 'true' ]; then
apk add --no-cache php82-dev gcc make libc-dev graphicsmagick-dev libtool graphicsmagick libgomp
apk add --no-cache php82-dev gcc make libc-dev graphicsmagick-dev libtool graphicsmagick libgomp -X https://dl-cdn.alpinelinux.org/alpine/v3.22/community
pecl82 channel-update pecl.php.net
pecl82 install channel://pecl.php.net/gmagick-2.0.6RC1 < /dev/null || true
apk del --no-cache php82-dev gcc make libc-dev graphicsmagick-dev libtool
Expand Down Expand Up @@ -221,13 +221,6 @@ setup_php83_alpine() {
}

setup_php84_alpine() {
alpine_version="$(cat /etc/alpine-release)"
if [ "$(printf '%s\n' "3.21" "${alpine_version}" | sort -V | head -n1 || true)" = "3.21" ]; then
REPOS=""
else
REPOS="-X https://dl-cdn.alpinelinux.org/alpine/v3.21/community"
fi

if [ "${LITE_INSTALL}" != 'true' ]; then
# missing: php84-pecl-mcrypt php84-pecl-timezonedb
EXTENSIONS="icu-data-full ghostscript php84-bcmath php84-ftp php84-intl php84-soap php84-pecl-igbinary php84-pecl-ssh2"
Expand Down Expand Up @@ -275,11 +268,10 @@ setup_php84_alpine() {
php84-xml \
php84-xmlreader \
php84-xmlwriter \
php84-zip ${EXTENSIONS} ${REPOS}
php84-zip ${EXTENSIONS}

if [ "${SKIP_GMAGICK}" != 'true' ]; then
# shellcheck disable=SC2086
apk add --no-cache php84-dev gcc make libc-dev graphicsmagick-dev libtool graphicsmagick libgomp ${REPOS}
apk add --no-cache php84-dev gcc make libc-dev graphicsmagick-dev libtool graphicsmagick libgomp
pecl84 channel-update pecl.php.net
pecl84 install channel://pecl.php.net/gmagick-2.0.6RC1 < /dev/null || true
echo "extension=gmagick.so" > /etc/php84/conf.d/40_gmagick.ini
Expand All @@ -289,13 +281,13 @@ setup_php84_alpine() {
# Alpine Edge: this symlink is broken
rm -f /usr/bin/phar.phar

[ ! -f /usr/bin/pear ] && ln -s /usr/bin/pear84 /usr/bin/pear
[ ! -f /usr/bin/peardev ] && ln -s /usr/bin/peardev84 /usr/bin/peardev
[ ! -f /usr/bin/pecl ] && ln -s /usr/bin/pecl84 /usr/bin/pecl
[ ! -f /usr/bin/phar.phar ] && ln -s /usr/bin/phar.phar84 /usr/bin/phar.phar
[ ! -f /usr/bin/phar ] && ln -s /usr/bin/phar84 /usr/bin/phar
[ ! -f /usr/bin/php ] && ln -s /usr/bin/php84 /usr/bin/php
[ ! -f /usr/sbin/php-fpm ] && ln -s /usr/sbin/php-fpm84 /usr/sbin/php-fpm
[ ! -f /usr/bin/pear ] && ln -sf /usr/bin/pear84 /usr/bin/pear
[ ! -f /usr/bin/peardev ] && ln -sf /usr/bin/peardev84 /usr/bin/peardev
[ ! -f /usr/bin/pecl ] && ln -sf /usr/bin/pecl84 /usr/bin/pecl
[ ! -f /usr/bin/phar.phar ] && ln -sf /usr/bin/phar.phar84 /usr/bin/phar.phar
[ ! -f /usr/bin/phar ] && ln -sf /usr/bin/phar84 /usr/bin/phar
[ ! -f /usr/bin/php ] && ln -sf /usr/bin/php84 /usr/bin/php
[ ! -f /usr/sbin/php-fpm ] && ln -sf /usr/sbin/php-fpm84 /usr/sbin/php-fpm
true
}

Expand Down
2 changes: 1 addition & 1 deletion features/src/xdebug/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Xdebug",
"id": "xdebug",
"version": "1.6.0",
"version": "1.7.0",
"description": "Configures Xdebug for the Dev Environment",
"options": {
"enabled": {
Expand Down
12 changes: 2 additions & 10 deletions features/src/xdebug/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ xdebug_81_alpine() {
}

xdebug_82_alpine() {
apk add --no-cache php82-pecl-xdebug
apk add --no-cache php82-pecl-xdebug -X https://dl-cdn.alpinelinux.org/alpine/v3.22/community
rm -f /etc/php81/conf.d/50_xdebug.ini
}

Expand All @@ -36,15 +36,7 @@ xdebug_83_alpine() {
}

xdebug_84_alpine() {
alpine_version="$(cat /etc/alpine-release)"
if [ "$(printf '%s\n' "3.21" "${alpine_version}" | sort -V | head -n1 || true)" = "3.21" ]; then
REPOS=""
else
REPOS="-X https://dl-cdn.alpinelinux.org/alpine/v3.21/community"
fi

# shellcheck disable=SC2086 # We need to expand $REPOS
apk add --no-cache php84-pecl-xdebug ${REPOS}
apk add --no-cache php84-pecl-xdebug
rm -f /etc/php81/conf.d/50_xdebug.ini
}

Expand Down