Created
July 14, 2017 13:18
-
-
Save arvsr1988/3c852790fa26b1cff0b962b8e8fcb1eb to your computer and use it in GitHub Desktop.
docker script for node 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
#how to run app in docker | |
#docker build -t <name> . | |
#docker run -p 3000:3000 <name> | |
FROM node:6-alpine | |
# Create app directory | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
# Install app dependencies | |
COPY package.json /usr/src/app/ | |
RUN npm install | |
# Bundle app source | |
COPY . /usr/src/app | |
# replace this with your application's default port | |
CMD [ "node", "server/index.js" ] | |
EXPOSE 3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment