Base Dockerfile for NPM modules.
Available on Docker Hub as pavlov/alpine-node.
FROM pavlov/alpine-node:latest
MAINTAINER Laika <[email protected]>
# deps
RUN apk --update add gcc g++ python
# install
RUN mkdir -p /opt/app
WORKDIR /opt/app
COPY . ./
RUN npm install
# clean up
RUN apk del gcc g++ python && \
rm -rf /tmp/* /var/cache/apk/* /root/.npm /root/.npmrc /root/.node-gyp
# run
EXPOSE 80
CMD [ "npm", "start" ]
$ make