34 lines
1.6 KiB
Docker
34 lines
1.6 KiB
Docker
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/typescript-node/.devcontainer/base.Dockerfile
|
|
|
|
# [Choice] Node.js version: 16, 14, 12
|
|
FROM node:12-slim
|
|
|
|
# [Optional] Uncomment this section to install additional OS packages.
|
|
RUN apt-get update \
|
|
&& apt-get install -y wget gnupg make git \
|
|
&& 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/*
|
|
|
|
RUN npm i puppeteer \
|
|
# Add user so we don't need --no-sandbox.
|
|
# same layer as npm install to keep re-chowned files from using up several hundred MBs more space
|
|
# && groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
|
|
# && mkdir -p /home/pptruser/Downloads \
|
|
# && chown -R pptruser:pptruser /home/pptruser \
|
|
# && chown -R pptruser:pptruser /node_modules
|
|
|
|
# Run everything after as non-privileged user.
|
|
#USER pptruser
|
|
|
|
|
|
# [Optional] Uncomment if you want to install an additional version of node using nvm
|
|
# ARG EXTRA_NODE_VERSION=10
|
|
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
|
|
|
|
# [Optional] Uncomment if you want to install more global node packages
|
|
# RUN su node -c "npm install -g <your-package-list -here>"
|