# FROM linuxserver/rdesktop:alpine-icewm
# # FROM linuxserver/rdesktop:alpine-openbox
FROM alpine:3.18

RUN apk update --no-cache
RUN apk add --no-cache npm chromium
RUN npm i -g pnpm

RUN mkdir /consumer
WORKDIR /consumer

USER root
COPY ./package.json /consumer/package.json
COPY ./pnpm-lock.yaml /consumer/pnpm-lock.yaml
RUN pnpm i

COPY ./consumer.js /consumer/consumer.js
COPY ./puppeteer.js /consumer/puppeteer.js

COPY ./docker.sh /docker.sh
RUN chmod +x /docker.sh

CMD [ "sh", "/docker.sh" ]
