Andrew Ferrazzutti
be1ec0217c
* Update Dockerfiles to work properly * Use latest available version of Alpine Linux * Update Puppeteer to 9.1.1 to match Chrome version available in latest Alpine Linux * Add docker script for Node process to allow custom config * Provide separate example config for running Node in docker TODO: Update SETUP.md with Docker instructions
22 lines
557 B
Docker
22 lines
557 B
Docker
FROM node:16-alpine3.14
|
|
|
|
ARG TARGETARCH=amd64
|
|
|
|
RUN apk add --no-cache chromium xvfb-run xdotool
|
|
|
|
WORKDIR /opt/matrix-puppeteer-line/puppet
|
|
|
|
# Want to use same UID as Python process so the Unix socket can be shared.
|
|
# But yarn hits snags if there is no user for the UID it's run under.
|
|
RUN adduser -Du 1337 --gecos "" line
|
|
|
|
VOLUME /data
|
|
|
|
RUN chown 1337:1337 .
|
|
USER 1337
|
|
COPY package.json yarn.lock ./
|
|
RUN yarn --production && rm -rf node_modules/puppeteer/.local-chromium
|
|
|
|
COPY src src
|
|
COPY docker-run.sh example-config-docker.json ./
|
|
CMD ["./docker-run.sh"] |