Skip to content

Instantly share code, notes, and snippets.

@avtaniket
Created March 30, 2017 06:12
Show Gist options
  • Save avtaniket/2fb5da8590e2e566a2fe958c94f3d305 to your computer and use it in GitHub Desktop.
Save avtaniket/2fb5da8590e2e566a2fe958c94f3d305 to your computer and use it in GitHub Desktop.
Dockerizing a Node.js web app
FROM node:argon
# Install softwares
RUN apt-get update && \
apt-get install -y openjdk-7-jdk
# Create app directory
RUN mkdir -p /iconapp
WORKDIR /iconapp
# Install app dependencies
COPY package.json /iconapp
# To fixed phantomjs install issue
RUN npm install phantomjs-prebuilt
RUN npm install
# Bundle app source
COPY . /iconapp
#set environment variables
ENV NODE_ENV production
EXPOSE 10010
CMD [ "npm", "start" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment