Created
July 4, 2018 00:12
-
-
Save steren/dea86dd2352445f926e4d926db709469 to your computer and use it in GitHub Desktop.
Headless Chrome Dockerfile
This file contains hidden or 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
FROM node:8 | |
# Install utilities | |
RUN apt-get update --fix-missing && apt-get -y upgrade | |
# Install latest chrome dev package. | |
RUN 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-unstable --no-install-recommends \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& rm -rf /src/*.deb | |
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 /usr/local/bin/dumb-init | |
RUN chmod +x /usr/local/bin/dumb-init | |
# Start the app | |
WORKDIR /usr/src/app | |
COPY package*.json ./ | |
ENV PORT=8080 | |
ENV NODE_ENV=production | |
RUN npm install --production | |
COPY . . | |
EXPOSE 8080 | |
CMD [ "npm", "start" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment