The path /usr/local/lib/node_modules/... does not exist in the image. runner.js already falls back to `which sitespeed.io` automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
1.2 KiB
Docker
38 lines
1.2 KiB
Docker
# ─────────────────────────────────────────────────────────────────────────────
|
|
# Speedboard Docker image
|
|
#
|
|
# Based on the official sitespeed.io image which already includes:
|
|
# - Node.js 20
|
|
# - Chrome & Firefox (headless)
|
|
# - Xvfb
|
|
# - sitespeed.io CLI
|
|
# ─────────────────────────────────────────────────────────────────────────────
|
|
FROM sitespeedio/sitespeed.io:latest
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy speedboard app files
|
|
COPY package.json ./
|
|
RUN npm install --omit=dev
|
|
|
|
COPY . .
|
|
|
|
RUN chmod +x /app/start.sh
|
|
|
|
# Create persistent directories
|
|
RUN mkdir -p /data/reports
|
|
|
|
# Symlink reports dir into app folder
|
|
RUN ln -sf /data/reports /app/reports
|
|
|
|
# Runtime env
|
|
ENV PORT=3132 \
|
|
IN_DOCKER=1 \
|
|
NODE_ENV=production
|
|
|
|
EXPOSE 3132
|
|
|
|
# start.sh boots Xvfb (virtual display for Chrome/Firefox) then runs the app.
|
|
# This mirrors what the base image's own entrypoint does.
|
|
ENTRYPOINT ["/app/start.sh"]
|