winzik/docker/twa/Dockerfile
David Nurdin fcb742b249 JumPHP 0.3.0: PHP 8.5; hot reload; the game on Google Play; the jumphp command for the whole system
- PHP 8.5 everywhere (desktop, relay, WebAssembly engine 8.5.12): php-sdl and php_glob patched, opcache JIT off
- hot reload of remote games (docs/hot-reload.md): assets in place, a scene entered again, or PHP restarted in
  the same engine (phpw_restart) in the scene that was playing; JumPHP\Scene\HotReloadable keeps its state
- what PHP writes goes to the page around the game (jumphp:output), phpinfo() as HTML
- bin/jumphp twa: the game as an Android app (Trusted Web Activity, Bubblewrap in Docker; docs/android.md)
- bin/jumphp cli:install: the jumphp command (tools/jumphp-cli), new projects, a question when Packagist has
  a newer JumPHP; offered by the wizard
- Testing\Game closes SDL before PHP ends (an intermittent crash at the end of the tests)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 22:17:30 +01:00

12 lines
962 B
Docker

# The Android app of a game (a Trusted Web Activity: the game's web page in Chrome, full screen, as a Play Store
# app), built by Google's Bubblewrap: bin/jumphp twa <game>, tools/twa.sh. Node + JDK 17 + Bubblewrap; the
# Android SDK is not in the image: its license is accepted by the user on the first build, then it is kept in
# ~/.jumphp/android-sdk (as Gradle's cache in ~/.jumphp/gradle).
FROM node:22.20.0-bookworm-slim
ARG BUBBLEWRAP=1.27.0
RUN apt-get update && apt-get install -y --no-install-recommends openjdk-17-jdk-headless unzip curl ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g --no-fund --no-audit "@bubblewrap/cli@$BUBBLEWRAP" "@bubblewrap/core@$BUBBLEWRAP" \
&& ln -s "$(dirname "$(dirname "$(readlink -f "$(which javac)")")")" /opt/jdk \
&& java -version 2>&1 | head -1 && npm ls -g --depth=0 | grep bubblewrap
ENV JAVA_HOME=/opt/jdk ANDROID_HOME=/opt/android-sdk NODE_PATH=/usr/local/lib/node_modules