Compare commits
2 commits
b048aca93b
...
7b14aa240c
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b14aa240c | |||
| 9054c25d0e |
2 changed files with 30 additions and 23 deletions
|
|
@ -1,26 +1,34 @@
|
||||||
# Development Dockerfile with FrankenPHP
|
# Development Dockerfile with FrankenPHP
|
||||||
FROM dunglas/frankenphp:latest-php8.3-alpine
|
#
|
||||||
|
# Debian rather than Alpine so Playwright can run its own Chromium: it treats
|
||||||
|
# debian12 as an officially supported platform and has no musl build at all.
|
||||||
|
FROM dunglas/frankenphp:latest-php8.3-bookworm
|
||||||
|
|
||||||
# Install system dependencies + development tools
|
# Install system dependencies + development tools. Node comes from NodeSource
|
||||||
RUN apk add --no-cache \
|
# rather than apt: bookworm ships Node 18, below what Vite 6 targets.
|
||||||
nodejs \
|
RUN apt-get update \
|
||||||
npm \
|
&& apt-get install -y --no-install-recommends \
|
||||||
git \
|
ca-certificates \
|
||||||
mysql-client \
|
curl \
|
||||||
vim \
|
gnupg \
|
||||||
bash \
|
git \
|
||||||
nano \
|
default-mysql-client \
|
||||||
chromium \
|
vim \
|
||||||
nss \
|
nano \
|
||||||
freetype \
|
bash \
|
||||||
harfbuzz \
|
unzip \
|
||||||
ttf-freefont \
|
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||||
font-noto-emoji
|
&& apt-get install -y --no-install-recommends nodejs \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Playwright ships glibc-linked browser builds that do not run on Alpine (musl),
|
# Playwright's browser lives outside the bind-mounted /app so a host node_modules
|
||||||
# so drive Alpine's own Chromium instead of downloading one.
|
# never shadows it; --with-deps pulls the shared libraries Chromium needs.
|
||||||
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 \
|
ENV PLAYWRIGHT_BROWSERS_PATH=/opt/playwright
|
||||||
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
COPY package.json package-lock.json /tmp/pw/
|
||||||
|
RUN cd /tmp/pw \
|
||||||
|
&& npm ci --no-audit --no-fund \
|
||||||
|
&& ./node_modules/.bin/playwright install --with-deps chromium \
|
||||||
|
&& rm -rf /tmp/pw
|
||||||
|
|
||||||
# Install PHP extensions including xdebug for development
|
# Install PHP extensions including xdebug for development
|
||||||
RUN install-php-extensions \
|
RUN install-php-extensions \
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,8 @@ services:
|
||||||
# Vite
|
# Vite
|
||||||
VITE_HOST: "0.0.0.0"
|
VITE_HOST: "0.0.0.0"
|
||||||
|
|
||||||
# Playwright drives Alpine's system Chromium (musl); see Dockerfile.dev
|
# Chromium is baked into the image outside /app; see Dockerfile.dev
|
||||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
|
PLAYWRIGHT_BROWSERS_PATH: "/opt/playwright"
|
||||||
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH: "/usr/bin/chromium-browser"
|
|
||||||
volumes:
|
volumes:
|
||||||
# Mount entire project for hot reload with SELinux context
|
# Mount entire project for hot reload with SELinux context
|
||||||
- ../..:/app:Z
|
- ../..:/app:Z
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue