2021-07-12 02:27:33 -04:00
|
|
|
FROM node:16-alpine3.14
|
2020-08-24 08:23:10 -04:00
|
|
|
|
2021-07-12 02:27:33 -04:00
|
|
|
ARG TARGETARCH=amd64
|
2020-08-24 11:10:16 -04:00
|
|
|
|
2022-05-03 22:56:06 -04:00
|
|
|
RUN apk add --no-cache chromium xvfb-run xdotool gtk+3.0
|
2020-08-24 11:53:56 -04:00
|
|
|
|
2021-03-15 01:40:56 -04:00
|
|
|
WORKDIR /opt/matrix-puppeteer-line/puppet
|
2021-07-12 02:27:33 -04:00
|
|
|
|
|
|
|
# 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
|
2020-08-24 08:23:10 -04:00
|
|
|
COPY package.json yarn.lock ./
|
2020-08-24 11:10:16 -04:00
|
|
|
RUN yarn --production && rm -rf node_modules/puppeteer/.local-chromium
|
2020-08-24 08:23:10 -04:00
|
|
|
|
2021-07-12 02:27:33 -04:00
|
|
|
COPY src src
|
|
|
|
COPY docker-run.sh example-config-docker.json ./
|
|
|
|
CMD ["./docker-run.sh"]
|