-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2229bb4
commit 4202acd
Showing
3 changed files
with
642 additions
and
749 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
.github | ||
.idea | ||
Screenshot.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,27 @@ | ||
# Inspired by: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md | ||
|
||
FROM node:lts-slim | ||
|
||
# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others) | ||
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer | ||
# installs, work. | ||
RUN apt-get update \ | ||
&& apt-get install -y wget gnupg \ | ||
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | ||
&& sh -c 'echo "deb [arch=amd64] 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-kacst fonts-freefont-ttf libxss1 \ | ||
--no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# https://github.com/puppeteer/puppeteer/tree/main/docker | ||
|
||
FROM ghcr.io/puppeteer/puppeteer:23 | ||
|
||
USER root | ||
|
||
# If running Docker >= 1.13.0 use docker run's --init arg to reap zombie processes, otherwise | ||
# uncomment the following lines to have `dumb-init` as PID 1 | ||
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_x86_64 /usr/local/bin/dumb-init | ||
RUN chmod +x /usr/local/bin/dumb-init | ||
ENTRYPOINT ["dumb-init", "--"] | ||
|
||
RUN groupadd -r pptruser \ | ||
&& useradd -r -g pptruser pptruser \ | ||
&& mkdir -p /home/pptruser/puppet-show \ | ||
&& chown -R pptruser:pptruser /home/pptruser | ||
COPY . /home/pptruser/puppet-show | ||
WORKDIR /home/pptruser/puppet-show | ||
|
||
# Corporate SSL proxy | ||
RUN npm config set strict-ssl false -g | ||
RUN chown -R pptruser:pptruser /home/pptruser/puppet-show | ||
|
||
# Run everything after as non-privileged user. | ||
USER pptruser | ||
|
||
WORKDIR /home/pptruser/puppet-show | ||
|
||
RUN npm install puppet-show | ||
# Install puppet-show deps from package-lock.json | ||
RUN npm ci . | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["node", "node_modules/puppet-show/bin/www"] | ||
CMD ["node", "bin/www"] | ||
|
||
# Now navigate web browser to http://localhost:3000/puppet-show/ |
Oops, something went wrong.