Skip to content

Instantly share code, notes, and snippets.

@mjzone
Created May 21, 2024 08:26
Show Gist options
  • Save mjzone/6a79b08c9c13020b081eb1bd240bd993 to your computer and use it in GitHub Desktop.
Save mjzone/6a79b08c9c13020b081eb1bd240bd993 to your computer and use it in GitHub Desktop.
FROM node:20@sha256:cb7cd40ba6483f37f791e1aace576df449fc5f75332c19ff59e2c6064797160e
ENV LANG en_US.UTF-8
RUN apt-get update \
&& apt-get install -y wget gnupg \
&& 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] https://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 \
dbus \
dbus-x11 \
libgbm1 \
libxshmfence1 \
libglib2.0-0 \
libnss3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libx11-xcb1 \
libxcomposite1 \
libxrandr2 \
libasound2 \
libxdamage1 \
xdg-utils \
lsb-release \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd -r pptruser && useradd -rm -g pptruser -G audio,video pptruser
WORKDIR /home/pptruser
# Copy your application code
COPY --chown=pptruser:pptruser . .
USER pptruser
# Install your application dependencies
RUN npm install
CMD ["node", "app.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment