Created
March 11, 2017 06:45
-
-
Save buritica/068389b834eab0a727368ebca4c26537 to your computer and use it in GitHub Desktop.
node dockerfile with yarn
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:7.7 | |
# Install Yarn | |
RUN curl -o- -L https://yarnpkg.com/install.sh | bash | |
# Create app directory | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
# Copy app dependency files | |
ADD package.json yarn.lock /tmp/ | |
# Install packages and link to tmp file | |
RUN cd /tmp && yarn | |
RUN cd /usr/src/app && ln -s /tmp/node_modules | |
# Bundle app source | |
COPY . /usr/src/app | |
CMD [ "yarn", "db:seed" ] | |
CMD [ "./node_modules/.bin/nodemon", "-L", "index.js" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment