diff --git a/docker/Dockerfile b/docker/Dockerfile index d411dc955d6..2cba94b54f4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,8 +8,9 @@ RUN apt-get update \ && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/googlechrome-linux-keyring.gpg \ && sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/googlechrome-linux-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ && apt-get update \ - && apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-freefont-ttf libxss1 \ + && apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-freefont-ttf libxss1 dbus dbus-x11 \ --no-install-recommends \ + && service dbus start \ && rm -rf /var/lib/apt/lists/* \ && groupadd -r pptruser && useradd -rm -g pptruser -G audio,video pptruser @@ -19,6 +20,8 @@ WORKDIR /home/pptruser COPY puppeteer-browsers-latest.tgz puppeteer-latest.tgz puppeteer-core-latest.tgz ./ +ENV DBUS_SESSION_BUS_ADDRESS autolaunch: + # Install @puppeteer/browsers, puppeteer and puppeteer-core into /home/pptruser/node_modules. RUN npm i ./puppeteer-browsers-latest.tgz ./puppeteer-core-latest.tgz ./puppeteer-latest.tgz \ && rm ./puppeteer-browsers-latest.tgz ./puppeteer-core-latest.tgz ./puppeteer-latest.tgz \