Created
October 23, 2015 06:37
-
-
Save fundon/69abfcb9a8e5f800d771 to your computer and use it in GitHub Desktop.
Using Docker Compose in Node.js Project
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 mhart/alpine-node | |
# FROM mhart/alpine-node:base | |
# FROM mhart/alpine-node:base-0.10 | |
WORKDIR /src | |
ADD . . | |
# If you have native dependencies, you’ll need extra tools | |
RUN apk add — update make gcc g++ python | |
# If you need npm, don’t use a base tag | |
RUN npm install | |
# If you had native dependencies you can now remove build tools | |
RUN apk del make gcc g++ python && \ | |
rm -rf /tmp/* /var/cache/apk/* /root/.npm /root/.node-gyp | |
EXPOSE 3000 | |
CMD [“npm”, “start”] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment