Skip to content

Instantly share code, notes, and snippets.

@buster95
Created May 17, 2023 02:02
Show Gist options
  • Save buster95/a7157ebbbc9413b6b3932bc6531fd7ce to your computer and use it in GitHub Desktop.
Save buster95/a7157ebbbc9413b6b3932bc6531fd7ce to your computer and use it in GitHub Desktop.
Dockerfile examples
FROM node:12.18.3
WORKDIR /app
COPY . .
# --production --dev
RUN npm install
RUN apt-get update
# Installing chromium libraries
ENV CHROME_VERSION=81.0.4044.138-1
RUN set -x \
&& apt-get update \
&& apt-get install wget --yes \
&& wget --no-check-certificate https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb \
&& dpkg -i google-chrome-stable_${CHROME_VERSION}_amd64.deb || apt -y -f install \
&& rm google-chrome-stable_${CHROME_VERSION}_amd64.deb \
&& apt autoremove --yes
ENV CHROME_BIN /usr/bin/google-chrome-stable
EXPOSE 80
CMD ["npm", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment