From 49a6ffd3148cd07b00acf32a895afd20954a64f4 Mon Sep 17 00:00:00 2001 From: Dan Head Date: Fri, 10 Feb 2017 10:08:34 +0000 Subject: [PATCH] Update Dockerfile to support building on Docker Cloud --- Dockerfile | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 530f5c8..a07afa9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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