Created
January 5, 2019 12:01
-
-
Save MohammedEssehemy/9f42fd6e25986f0bce349ab597a73bba to your computer and use it in GitHub Desktop.
node with phantomJs #node #phantomjs #docker
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
# Switch Node images to non-alpine as PhantomJS doesn't run on Alpine | |
FROM node:10-jessie-slim | |
LABEL maintainer="Mohammed Essehemy <[email protected]>" | |
ENV BUILD_PACKAGES="curl build-essential g++ flex bison gperf ruby perl \ | |
libssl-dev libpng-dev libjpeg-dev python \ | |
libx11-dev libxext-dev libsqlite3-dev \ | |
libicu-dev libfreetype6" | |
ENV RUN_PACKAGES="libfontconfig" | |
WORKDIR /source | |
COPY package.json . | |
RUN apt-get update && apt-get install -y $BUILD_PACKAGES && \ | |
npm install --production && \ | |
npm audit fix && \ | |
npm cache clean --force && \ | |
apt-get remove -y $BUILD_PACKAGES && \ | |
apt-get install -y $RUN_PACKAGES && \ | |
apt-get -y autoremove && apt-get -y autoclean && apt-get clean | |
ADD ./ . | |
RUN chown node:node -R /source | |
USER node | |
CMD node ./index.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment