forked from y-kkamil/console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (28 loc) · 880 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
36
37
38
39
FROM node:10.11.0-alpine as ui-generator
WORKDIR /app
# Copy licenses
COPY licenses/ /app/licenses/
# Install global dependencies
RUN apk update && apk upgrade && \
apk add --no-cache curl
# Install root and app dependencies
COPY ./temp /app
RUN npm run bootstrap:prod
COPY package.json package-lock.json config-overrides.js /app/addons/
RUN cd /app/addons && npm install --no-optional
# Copy sources
COPY ./src /app/addons/src
COPY ./public /app/addons/public
# Set env variables
ENV PRODUCTION true
ENV CI true
# Test & Build
RUN cd /app/addons && npm test
RUN cd /app/addons && npm run build
FROM nginx:1.14.0-alpine
LABEL source [email protected]:kyma-project/console.git
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=ui-generator /app/addons/build var/public
COPY --from=ui-generator /app/licenses/ /app/licenses/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]