Created
March 30, 2017 06:12
-
-
Save avtaniket/2fb5da8590e2e566a2fe958c94f3d305 to your computer and use it in GitHub Desktop.
Dockerizing a Node.js web app
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
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