Ekko Chang | 5919a14 | 2019-05-13 18:41:30 +0800 | [diff] [blame] | 1 | FROM node:alpine AS builder |
| 2 | MAINTAINER Ekko Chang <ekko.chang@qct.io> |
| 3 | |
| 4 | LABEL org.label-schema.docker.build="docker build -t dl-admin . --no-cache" \ |
| 5 | org.label-schema.docker.run="docker run -p 80:80 --add-host=dl_feeder:your_feeder_ipaddress dl-admin" |
| 6 | |
| 7 | WORKDIR /app |
| 8 | COPY ./src . |
| 9 | COPY ./nginx . |
| 10 | RUN npm install && \ |
| 11 | npm run build |
| 12 | |
| 13 | |
| 14 | FROM nginx:1.15.12 |
| 15 | RUN apt-get update && \ |
| 16 | apt-get install -y dnsmasq |
| 17 | |
| 18 | RUN echo "\n\n# Docker extra config \nuser=root\naddn-hosts=/etc/hosts\n" >> /etc/dnsmasq.conf |
| 19 | |
| 20 | COPY --from=builder /app/dist/* /usr/share/nginx/html/ |
| 21 | COPY --from=builder /app/dl-admin-nginx.conf /etc/nginx/conf.d/default.conf |
| 22 | |
| 23 | CMD service dnsmasq restart && nginx -g "daemon off;" |