forked from y-kkamil/console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (25 loc) · 986 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
# This Dockerfile must be execute with higher context, because firstly we have to create react components lib with local changes.
# If you want to build image without local changes of react components, delete 16 line of code.
FROM node:10.11.0-alpine as ui-generator
WORKDIR /app
# Install app dependencies
COPY package.json package-lock.json config-overrides.js /app/
RUN npm install --no-optional
# Copy sources
COPY src /app/src
COPY public /app/public
# Copy local changes from react-components package
COPY react-components/index.js /app/node_modules/@kyma-project/react-components/lib/index.js
COPY react-odata/lib /app/node_modules/@kyma-project/odata-react/lib
# Set env variables
ENV PRODUCTION true
# Test & Build
ENV CI true
RUN npm test
RUN 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/build var/public
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]