mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
(chore): bump docker-base to 2.0.0
2.0.0 fetches every PHP extension by commit SHA and verifies the PECL tarball by checksum, so the base is no longer assembled from mutable upstream tags, and it carries the extension updates that came with that (swoole 6.2.2, mongodb 2.3.3, protobuf 5.35.1, zstd 0.17.0, xdebug 3.5.3 and the rest) on a freshly patched php:8.5-alpine. It also stops shipping XDebug in the default tag. That was never intentional — docker-base's Dockerfile ended with the XDebug stage and its build passed no --target, so the debugger rode along into the image Appwrite and Cloud both build on. This repo depended on that accident: the development target copies dev/xdebug.ini, which is `zend_extension=xdebug`, but nothing here ever installed the extension. XDebug now comes from the 2.0.0-xdebug tag, which is the same base build with the extension added, so the module API always matches. It is mounted rather than copied, so xdebug.so only enters a layer when DEBUG=true, and only in the development stage — production has no path to it. Verified: production and Cloud images report no xdebug module and no xdebug.so, `--target production` never builds the xdebug stage at all, and `--target development --build-arg DEBUG=true` loads Xdebug 3.5.3. The XDebug removals in the base and production stages went with it. They existed to strip what the base wrongly shipped, and now strip nothing.
This commit is contained in:
1 parent
42af673af6
commit
735faed07b
2 files changed
+12
-11
No files matched your search
+11
-10
@@ -12,7 +12,7 @@ RUN composer install --ignore-platform-reqs --optimize-autoloader \
|
||||
--no-plugins --no-scripts --prefer-dist \
|
||||
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`
|
||||
|
||||
FROM appwrite/base:1.4.4 AS base
|
||||
FROM appwrite/base:2.0.0 AS base
|
||||
|
||||
LABEL maintainer="team@appwrite.io"
|
||||
|
||||
@@ -23,12 +23,7 @@ ENV DEBUG=$DEBUG
|
||||
ENV _APP_VERSION=$VERSION \
|
||||
_APP_HOME=https://appwrite.io
|
||||
|
||||
RUN \
|
||||
if [ "$DEBUG" != "true" ]; then \
|
||||
rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
|
||||
rm -f /usr/local/lib/php/extensions/no-debug-non-zts-*/xdebug.so; \
|
||||
fi && \
|
||||
if [ "$DEBUG" == "true" ]; then \
|
||||
RUN if [ "$DEBUG" == "true" ]; then \
|
||||
apk add boost boost-dev; \
|
||||
fi
|
||||
|
||||
@@ -107,8 +102,6 @@ RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/
|
||||
FROM base AS production
|
||||
|
||||
RUN rm -rf /usr/src/code/app/config/specs && \
|
||||
rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
rm -f /usr/local/lib/php/extensions/no-debug-non-zts-*/xdebug.so && \
|
||||
find /usr -name '*.a' -delete 2>/dev/null || true && \
|
||||
find /usr -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true && \
|
||||
find /usr -name '*.pyc' -delete 2>/dev/null || true
|
||||
@@ -117,12 +110,20 @@ EXPOSE 80
|
||||
|
||||
CMD [ "php", "app/http.php" ]
|
||||
|
||||
FROM appwrite/base:2.0.0-xdebug AS xdebug
|
||||
|
||||
FROM base AS development
|
||||
|
||||
COPY ./docs /usr/src/code/docs
|
||||
COPY ./dev /usr/src/code/dev
|
||||
|
||||
RUN if [ "$DEBUG" = "true" ]; then \
|
||||
# appwrite/base:2.0.0 ships without XDebug, so it cannot reach production or
|
||||
# Cloud. The -xdebug tag is the same build with the extension; mounting it
|
||||
# rather than copying keeps xdebug.so out of every layer unless DEBUG asked
|
||||
# for it, and guarantees an ABI match because both tags are one base build.
|
||||
RUN --mount=from=xdebug,source=/usr/local/lib/php/extensions,target=/tmp/extensions \
|
||||
if [ "$DEBUG" = "true" ]; then \
|
||||
cp /tmp/extensions/no-debug-non-zts-*/xdebug.so "$(php-config --extension-dir)/" && \
|
||||
cp /usr/src/code/dev/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
mkdir -p /tmp/xdebug && \
|
||||
apk add --update --no-cache openssh-client github-cli; \
|
||||
|
||||
@@ -6,7 +6,7 @@ CPU architecture support for Docker images used by the Appwrite stack. Platforms
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| **Core** | | | | | | | |
|
||||
| appwrite/appwrite | 🟢 | 🟢 | 🔴 | 🔴 | 🟢 | 🔴 | 🔴 |
|
||||
| appwrite/base:1.4.4 | 🟢 | 🟢 | 🔴 | 🔴 | 🟢 | 🔴 | 🔴 |
|
||||
| appwrite/base:2.0.0 | 🟢 | 🟢 | 🔴 | 🔴 | 🟢 | 🔴 | 🔴 |
|
||||
| appwrite/assistant:0.8.4 | 🟢 | 🟢 | 🔴 | 🔴 | 🟢 | 🔴 | 🔴 |
|
||||
| appwrite/browser:0.3.3 | 🟢 | 🟢 | 🔴 | 🔴 | 🟢 | 🔴 | 🔴 |
|
||||
| appwrite/embedding:0.1.0 | 🟢 | 🟢 | 🔴 | 🔴 | 🟢 | 🔴 | 🔴 |
|
||||
|
||||
Reference in new issue
Block a user