17 lines
343 B
Docker
17 lines
343 B
Docker
# Frontend build environment
|
|
FROM node:10.5-alpine
|
|
|
|
RUN mkdir -p /usr/src/app
|
|
|
|
COPY package.json /usr/src/app
|
|
RUN cd /usr/src/app && npm install
|
|
|
|
COPY . /usr/src/app
|
|
RUN cd /usr/src/app && npm run build
|
|
|
|
# Final nginx container
|
|
FROM nginx:1.15
|
|
|
|
COPY nginx/default.conf /etc/nginx/conf.d
|
|
COPY --from=0 /usr/src/app/dist/ /usr/share/nginx/html/
|