no clue if this will work (don't have a MAC to test on) but i had ChatGPT look at the code. give it a shot to see if this will work for you
Two ways to fix it
1. Minimal runtime-only fix (no rebuild needed if Chromium already exists in the image)
If the base image already has /usr/bin/chromium for ARM64 (unlikely here), you can force Puppeteer to use it:
bash
CopyEdit
docker run -d --name ws4channels \
--platform=linux/arm64 \
-p 9798:9798 \
-e ZIP_CODE=43123 \
-e WS4KP_HOST=192.168.1.123 \
-e WS4KP_PORT=8080 \
-e PUPPETEER_SKIP_DOWNLOAD=true \
-e PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \
ghcr.io/rice9797/ws4channels:latest
If /usr/bin/chromium doesn’t exist, the container will crash and you’ll need option 2.
2. Proper Dockerfile patch for ARM64
Add Chromium install + environment vars so Puppeteer never downloads the wrong one:
dockerfile
CopyEdit
FROM node:20-bookworm-slim
# Install ARM64 Chromium + deps + ffmpeg
RUN apt-get update && apt-get install -y --no-install-recommends \
chromium \
ffmpeg \
ca-certificates \
fonts-liberation \
libasound2 \
libatk-bridge2.0-0 \
libnss3 \
libx11-xcb1 \
libxcomposite1 \
libxdamage1 \
libxrandr2 \
libgbm1 \
&& rm -rf /var/lib/apt/lists/*
# Prevent Puppeteer from downloading Chromium, and point it at ARM binary
ENV PUPPETEER_SKIP_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
EXPOSE 9798
CMD ["node", "index.js"]
Then build/run for ARM64:
bash
CopyEdit
docker buildx build --platform linux/arm64/v8 -t ws4channels:arm64 --load .
docker run -d --platform=linux/arm64 --name ws4channels -p 9798:9798 \
-e ZIP_CODE=43123 -e WS4KP_HOST=192.168.1.123 -e WS4KP_PORT=8080 \
ws4channels:arm64