forked from CMS-Enterprise/SONAR
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.ui
More file actions
30 lines (23 loc) · 798 Bytes
/
Dockerfile.ui
File metadata and controls
30 lines (23 loc) · 798 Bytes
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
FROM node:18.18-alpine3.18 AS builder
LABEL org.opencontainers.image.licenses="CC0-1.0"
LABEL io.artifacthub.package.license="CC0-1.0"
WORKDIR /sonar/sonar-ui
COPY sonar-ui/package.json .
COPY sonar-ui/package-lock.json .
RUN npm ci
COPY sonar-ui .
RUN npm run build
CMD ["npm", "start"]
FROM nginx:1.25-alpine-slim
LABEL org.opencontainers.image.licenses="CC0-1.0"
LABEL io.artifacthub.package.license="CC0-1.0"
# make sure we are running the most recent version of these libraries
RUN apk upgrade --no-cache libssl3 libcrypto3
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
# remove busybox (after usage of rm)
RUN rm /bin/*
COPY --from=builder /sonar/sonar-ui/build .
COPY --from=builder /sonar/sonar-ui/default.conf /etc/nginx/conf.d/
EXPOSE 8080
ENTRYPOINT ["nginx", "-g", "daemon off;"]