Update Dockerfile to support building on Docker Cloud

This commit is contained in:
2017-02-10 10:08:34 +00:00
parent a3e6ce3fb5
commit 49a6ffd314

View File

@@ -1,14 +1,22 @@
FROM node:7.2.1-alpine
# Copy application files
COPY ./build /usr/src/app
WORKDIR /usr/src/app
ENV DATABASE_PATH db/wedding.db
ENV PORT 80
EXPOSE 80
# Install additional dependencies
RUN apk add --no-cache make gcc g++ python
# Copy app
COPY ./ /usr/src/app
WORKDIR /usr/src/app
# Install dev dependencies and build release
RUN npm install --silent
RUN npm run build --release --silent
WORKDIR /usr/src/app/build
# Install Node.js dependencies
RUN npm install --production --silent