From 5b93267f0c9e80f58076cd21305fbe121c61156d Mon Sep 17 00:00:00 2001 From: Nemo Date: Sun, 12 May 2019 22:05:44 +0530 Subject: [PATCH] Add CHROME_BIN environment in Docker - The upstream docker image uses Yarn, while I use npm and that screws up everything --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 91bd240..2e848f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,10 +7,14 @@ ARG VCS_REF WORKDIR /app +# Ensure that the chromium path hasn't changed +RUN ls /usr/local/share/.config/yarn/global/node_modules/puppeteer/.local-chromium/linux-650583/chrome-linux/chrome + COPY package.json package-lock.json /app/ RUN npm install + LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.name="Prometheus ACT Exporter" \ org.label-schema.vcs-url="https://git.captnemo.in/nemo/prometheus-act-exporter.git" \ @@ -20,6 +24,8 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ COPY index.js server.js prom.js *.md /app/ +ENV CHROME_BIN="/usr/local/share/.config/yarn/global/node_modules/puppeteer/.local-chromium/linux-650583/chrome-linux/chrome" + ENTRYPOINT ["/usr/local/bin/node", "server.js"] EXPOSE 3000