forked from y-kkamil/console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (28 loc) · 1 KB
/
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
FROM eu.gcr.io/kyma-project/test-infra/buildpack-node-chromium:v20201023-6c4eabe1 as builder
ARG app_name=core
WORKDIR /app
# Set env variables
ENV PRODUCTION true
ENV CI true
COPY . /app
RUN cd /app/${app_name} && \
make resolve && \
make verify && \
make pull-licenses && \
make build
### Main image ###
FROM alpine:3.14.3
### Install nginx package and remove cache ###
RUN apk add --update nginx && rm -rf /var/cache/apk/*
LABEL source [email protected]:kyma-project/console.git
ARG app_name=core
COPY ./${app_name}/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /app/${app_name}/dist /usr/share/nginx/html/
COPY --from=builder /app/${app_name}/licenses/ /app/licenses/
COPY --from=builder /app/${app_name}/nginx/conf.d /etc/nginx/conf.d/
COPY --from=builder /app/${app_name}/nginx/nginx.conf /etc/nginx/
COPY --from=builder /app/${app_name}/nginx/mime.types /etc/nginx/
RUN touch /var/run/nginx.pid && \
chown -R nginx:nginx /var/run/nginx.pid
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]