2018-12-04 15:00:16 +00:00
|
|
|
# Builder
|
|
|
|
FROM node:alpine as builder
|
|
|
|
|
2018-12-06 09:00:20 +00:00
|
|
|
RUN apk add --no-cache git
|
2018-12-04 15:00:16 +00:00
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
|
2018-12-06 09:00:20 +00:00
|
|
|
COPY package.json /src/package.json
|
|
|
|
RUN npm install
|
|
|
|
|
|
|
|
COPY . /src
|
|
|
|
RUN npm run build
|
2018-12-04 15:00:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
# App
|
|
|
|
FROM nginx:latest
|
|
|
|
|
|
|
|
COPY --from=builder /src/webapp /app
|
|
|
|
COPY config.sample.json /app/config.json
|
|
|
|
|
|
|
|
RUN rm -rf /usr/share/nginx/html \
|
|
|
|
&& ln -s /app /usr/share/nginx/html
|