| FROM node:20-alpine |
|
|
| WORKDIR /app |
| RUN apk add --no-cache \ |
| python3 \ |
| make \ |
| g++ \ |
| git \ |
| chromium \ |
| nss \ |
| freetype \ |
| freetype-dev \ |
| harfbuzz \ |
| ca-certificates \ |
| ttf-freefont \ |
| gcompat |
|
|
| ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 \ |
| PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium-browser \ |
| PORT=7860 |
|
|
| RUN git clone --depth 1 https://github.com/zhezzma/playwright-proxy . |
|
|
| RUN npm install |
| RUN npm run build |
|
|
| RUN addgroup -S -g 1001 nodejs && \ |
| adduser -S -D -H -u 1001 -G nodejs hono |
| RUN chown -R hono:nodejs /app |
|
|
| USER hono |
| EXPOSE 7860 |
|
|
| CMD ["node", "dist/index.js"] |