forked from wmo-im/wis2box-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (25 loc) · 875 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM node:14.18.1 AS ui-builder
RUN mkdir /usr/src/app
RUN echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list \
&& apt-get update \
&& apt-get upgrade \
&& apt-get install -y chromium
ENV PATH=/usr/src/app/node_modules/.bin:$PATH
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
COPY package.json /usr/src/app/package.json
WORKDIR /usr/src/app
RUN npm install && \
npm install -g @vue/cli
COPY . /usr/src/app
RUN npm run postinstall && \
npm run build && \
mkdir /tmp/app && \
cp -rp /usr/src/app/dist /tmp/app && \
rm -fr /usr/src/app
FROM nginx
COPY ./docker/entrypoint.sh /docker-entrypoint.d/entrypoint.sh
RUN chmod +x /docker-entrypoint.d/entrypoint.sh
COPY ./docker/nginx.conf /etc/nginx/nginx.conf
COPY --from=ui-builder /tmp/app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]