forked from sigstore/rekor-search-ui
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
38 lines (33 loc) · 1.68 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
# Builder Stage
FROM registry.access.redhat.com/ubi9/nodejs-20-minimal@sha256:1a76bfcd3671a667bdf305881004a2be309b394cf4861c99fa3d705b4ecb0a40 as builder
USER root
COPY package.json package-lock.json ./
RUN npm pkg delete scripts.prepare
RUN npm ci --ignore-scripts --network-timeout=100000 || \
(echo "Retrying npm ci" && sleep 5 && npm ci --ignore-scripts \
--network-timeout=100000) || \
(echo "Retrying npm ci again" && sleep 5 && npm ci --ignore-scripts \
--network-timeout=100000)
COPY . .
RUN npm run build
# Production Stage
FROM registry.access.redhat.com/ubi9/nodejs-20-minimal@sha256:1a76bfcd3671a667bdf305881004a2be309b394cf4861c99fa3d705b4ecb0a40 as production
USER 1001
EXPOSE 3000
LABEL \
com.redhat.component="trusted-artifact-signer-rekor-ui" \
name="trusted-artifact-signer-rekor-ui" \
version="0.0.1" \
summary="User Interface for checking Rekor Entries" \
description="Provides a user interface for checking Rekor Entries through a Node App" \
io.k8s.description="Provides a user interface for checking Rekor Entries through a Node App" \
io.k8s.display-name="Provides a user interface for checking Rekor Entries through a Node App" \
io.openshift.tags="rekor-ui, rekor, cli, rhtas, trusted, artifact, signer, sigstore" \
maintainer="trusted-artifact-signer@redhat.com"
COPY --from=builder /opt/app-root/src/package.json .
COPY --from=builder /opt/app-root/src/package-lock.json .
COPY --from=builder /opt/app-root/src/next.config.js ./
COPY --from=builder /opt/app-root/src/public ./public
COPY --from=builder /opt/app-root/src/.next/standalone ./
COPY --from=builder /opt/app-root/src/.next/static ./.next/static
CMD ["node", "server.js"]