Skip to content

Instantly share code, notes, and snippets.

@fundon
Created October 23, 2015 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fundon/69abfcb9a8e5f800d771 to your computer and use it in GitHub Desktop.
Save fundon/69abfcb9a8e5f800d771 to your computer and use it in GitHub Desktop.
Using Docker Compose in Node.js Project
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