Skip to content

Commit 8a165c6

Browse files
committed
docker puppeteer cannot launch browser fix
1 parent 1bca586 commit 8a165c6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Dockerfile-api

+8-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ ENV COUNTLY_CONTAINER="api" \
1717
COUNTLY_CONFIG_API_API_WORKERS="1" \
1818
COUNTLY_CONFIG_API_API_HOST="0.0.0.0" \
1919
NODE_OPTIONS="--max-old-space-size=2048" \
20-
TINI_VERSION="0.18.0"
21-
20+
TINI_VERSION="0.18.0"\
21+
PUPPETEER_CACHE_DIR=/opt/countly/.cache/puppeteer\
22+
#https://github.com/hardkoded/puppeteer-sharp/issues/2633
23+
XDG_CONFIG_HOME=/tmp/.chromium\
24+
XDG_CACHE_HOME=/tmp/.chromium
25+
2226
WORKDIR /opt/countly
2327
COPY . .
2428

@@ -58,7 +62,7 @@ RUN curl -s -L -o /tmp/tini.deb "https://github.com/krallin/tini/releases/downlo
5862
# cleanup & chown
5963
npm remove -y --no-save mocha nyc should supertest && \
6064
apt-get remove -y git gcc g++ make automake autoconf libtool pkg-config unzip sqlite3 && \
61-
apt-get install -y libgbm-dev libgbm1 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils && \
65+
apt-get install -y libgbm-dev libgbm1 gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils && \
6266
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
6367
rm -rf test /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* /root/.npm && \
6468
\
@@ -75,4 +79,4 @@ USER 1001:0
7579

7680
ENTRYPOINT ["/usr/bin/tini", "-v", "--"]
7781

78-
CMD ["/opt/countly/bin/docker/cmd.sh"]
82+
CMD ["/opt/countly/bin/docker/cmd.sh"]

0 commit comments

Comments
 (0)