-
Notifications
You must be signed in to change notification settings - Fork 21
/
Dockerfile.gui
33 lines (25 loc) · 953 Bytes
/
Dockerfile.gui
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
# build stage
FROM node:lts-alpine AS build-stage
RUN npm install -g @vue/cli-service
WORKDIR /app
COPY ./src/gui/package*.json ./
RUN npm install
COPY ./src/gui/public /app/public
COPY ./src/gui/src /app/src
COPY ./src/gui/babel.config.js .
COPY ./src/gui/package.json .
COPY ./src/gui/package-lock.json .
ENV NODE_OPTIONS=--openssl-legacy-provider
RUN npm run build
# production stage
FROM nginx:stable-alpine AS production-stage
RUN rm /docker-entrypoint.d/30-tune-worker-processes.sh
COPY ./src/gui/extras/30-envsubst-on-javascript.sh /docker-entrypoint.d/
COPY ./src/gui/extras/40-connection-tuning.sh /docker-entrypoint.d/
COPY ./src/gui/extras/50-logging.sh /docker-entrypoint.d/
RUN chmod +x /docker-entrypoint.d/*.sh
COPY ./src/gui/extras/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY ./VERSION.md /usr/share/nginx/html/VERSION.txt
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]