Skip to content

Commit 07a4409

Browse files
committed
chore: update Alpine to 3.23.3 and fix features
1 parent 7dbc908 commit 07a4409

6 files changed

Lines changed: 22 additions & 38 deletions

File tree

base-images/src/alpine-base/.devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"x-build": {
77
"name": "Alpine",
88
"image-name": "alpine-base",
9-
"image-version": "1.11.0"
9+
"image-version": "1.12.0"
1010
},
1111
"remoteUser": "vscode"
1212
}

base-images/src/alpine-base/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
FROM alpine:3.22.2@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412
1+
FROM alpine:3.23.3@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659
22

33
ARG USERNAME=vscode
44
ARG USER_UID=1000
55
ARG USER_GID=${USER_UID}
66

7-
ENV CONTAINER_USER ${USERNAME}
7+
ENV CONTAINER_USER=${USERNAME}
88

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

58-
ENV CHARSET UTF-8
59-
ENV LANG C.UTF-8
60-
ENV LC_COLLATE C
58+
ENV CHARSET=UTF-8
59+
ENV LANG=C.UTF-8
60+
ENV LC_COLLATE=C
6161

6262
ENTRYPOINT ["/usr/local/bin/runit-wrapper"]

features/src/php/devcontainer-feature.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "php",
33
"name": "PHP",
44
"description": "Installs PHP into the Dev Environment",
5-
"version": "2.9.0",
5+
"version": "2.10.0",
66
"documentationURL": "https://github.com/Automattic/vip-codespaces/tree/trunk/features/src/php",
77
"options": {
88
"version": {
@@ -44,7 +44,7 @@
4444
"settings": {
4545
"intelephense.environment.documentRoot": "/wp",
4646
"intelephense.environment.includePaths": ["/wp"],
47-
"intelephense.environment.phpVersion": "8.1.0",
47+
"intelephense.environment.phpVersion": "8.3.0",
4848
"intelephense.stubs": [
4949
"apcu", "bcmath", "calendar", "Core", "ctype", "curl", "date", "dom", "exif", "fileinfo", "filter", "fpm", "ftp", "gd", "gmagick", "gmp",
5050
"hash", "iconv", "igbinary", "intl", "json", "libxml", "mbstring", "memcache", "memcached", "meta", "mysqli", "newrelic", "openssl",

features/src/php/install.sh

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ setup_php82_alpine() {
130130
php82-xml \
131131
php82-xmlreader \
132132
php82-xmlwriter \
133-
php82-zip ${EXTENSIONS}
133+
php82-zip ${EXTENSIONS} -X https://dl-cdn.alpinelinux.org/alpine/v3.22/community
134134

135135
if [ "${SKIP_GMAGICK}" != 'true' ]; then
136-
apk add --no-cache php82-dev gcc make libc-dev graphicsmagick-dev libtool graphicsmagick libgomp
136+
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
137137
pecl82 channel-update pecl.php.net
138138
pecl82 install channel://pecl.php.net/gmagick-2.0.6RC1 < /dev/null || true
139139
apk del --no-cache php82-dev gcc make libc-dev graphicsmagick-dev libtool
@@ -221,13 +221,6 @@ setup_php83_alpine() {
221221
}
222222

223223
setup_php84_alpine() {
224-
alpine_version="$(cat /etc/alpine-release)"
225-
if [ "$(printf '%s\n' "3.21" "${alpine_version}" | sort -V | head -n1 || true)" = "3.21" ]; then
226-
REPOS=""
227-
else
228-
REPOS="-X https://dl-cdn.alpinelinux.org/alpine/v3.21/community"
229-
fi
230-
231224
if [ "${LITE_INSTALL}" != 'true' ]; then
232225
# missing: php84-pecl-mcrypt php84-pecl-timezonedb
233226
EXTENSIONS="icu-data-full ghostscript php84-bcmath php84-ftp php84-intl php84-soap php84-pecl-igbinary php84-pecl-ssh2"
@@ -275,11 +268,10 @@ setup_php84_alpine() {
275268
php84-xml \
276269
php84-xmlreader \
277270
php84-xmlwriter \
278-
php84-zip ${EXTENSIONS} ${REPOS}
271+
php84-zip ${EXTENSIONS}
279272

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

292-
[ ! -f /usr/bin/pear ] && ln -s /usr/bin/pear84 /usr/bin/pear
293-
[ ! -f /usr/bin/peardev ] && ln -s /usr/bin/peardev84 /usr/bin/peardev
294-
[ ! -f /usr/bin/pecl ] && ln -s /usr/bin/pecl84 /usr/bin/pecl
295-
[ ! -f /usr/bin/phar.phar ] && ln -s /usr/bin/phar.phar84 /usr/bin/phar.phar
296-
[ ! -f /usr/bin/phar ] && ln -s /usr/bin/phar84 /usr/bin/phar
297-
[ ! -f /usr/bin/php ] && ln -s /usr/bin/php84 /usr/bin/php
298-
[ ! -f /usr/sbin/php-fpm ] && ln -s /usr/sbin/php-fpm84 /usr/sbin/php-fpm
284+
[ ! -f /usr/bin/pear ] && ln -sf /usr/bin/pear84 /usr/bin/pear
285+
[ ! -f /usr/bin/peardev ] && ln -sf /usr/bin/peardev84 /usr/bin/peardev
286+
[ ! -f /usr/bin/pecl ] && ln -sf /usr/bin/pecl84 /usr/bin/pecl
287+
[ ! -f /usr/bin/phar.phar ] && ln -sf /usr/bin/phar.phar84 /usr/bin/phar.phar
288+
[ ! -f /usr/bin/phar ] && ln -sf /usr/bin/phar84 /usr/bin/phar
289+
[ ! -f /usr/bin/php ] && ln -sf /usr/bin/php84 /usr/bin/php
290+
[ ! -f /usr/sbin/php-fpm ] && ln -sf /usr/sbin/php-fpm84 /usr/sbin/php-fpm
299291
true
300292
}
301293

features/src/xdebug/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Xdebug",
33
"id": "xdebug",
4-
"version": "1.6.0",
4+
"version": "1.7.0",
55
"description": "Configures Xdebug for the Dev Environment",
66
"options": {
77
"enabled": {

features/src/xdebug/install.sh

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ xdebug_81_alpine() {
2626
}
2727

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

@@ -36,15 +36,7 @@ xdebug_83_alpine() {
3636
}
3737

3838
xdebug_84_alpine() {
39-
alpine_version="$(cat /etc/alpine-release)"
40-
if [ "$(printf '%s\n' "3.21" "${alpine_version}" | sort -V | head -n1 || true)" = "3.21" ]; then
41-
REPOS=""
42-
else
43-
REPOS="-X https://dl-cdn.alpinelinux.org/alpine/v3.21/community"
44-
fi
45-
46-
# shellcheck disable=SC2086 # We need to expand $REPOS
47-
apk add --no-cache php84-pecl-xdebug ${REPOS}
39+
apk add --no-cache php84-pecl-xdebug
4840
rm -f /etc/php81/conf.d/50_xdebug.ini
4941
}
5042

0 commit comments

Comments
 (0)