blob: 95af88a509b52be5b4768a3bd713f392a92fe595 [file] [log] [blame]
Ekko Chang5919a142019-05-13 18:41:30 +08001FROM node:alpine AS builder
2MAINTAINER Ekko Chang <ekko.chang@qct.io>
3
4LABEL 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
7WORKDIR /app
8COPY ./src .
9COPY ./nginx .
10RUN npm install && \
11 npm run build
12
13
14FROM nginx:1.15.12
15RUN apt-get update && \
16 apt-get install -y dnsmasq
17
18RUN echo "\n\n# Docker extra config \nuser=root\naddn-hosts=/etc/hosts\n" >> /etc/dnsmasq.conf
19
20COPY --from=builder /app/dist/* /usr/share/nginx/html/
21COPY --from=builder /app/dl-admin-nginx.conf /etc/nginx/conf.d/default.conf
22
23CMD service dnsmasq restart && nginx -g "daemon off;"