-
Notifications
You must be signed in to change notification settings - Fork 43
/
Dockerfile
54 lines (44 loc) · 1.83 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# NOTE: Since the `:latest` tag can have npm version changes, we are using
# a specific version tag. Container build errors have come up locally
# and via github action workflow when `:latest` is updated.
#
# Image info: https://catalog.redhat.com/software/containers/ubi9/nodejs-20/64770ac7a835530172eee6a9
# Relevant PRs:
# - https://github.com/konveyor/tackle2-ui/pull/1746
# - https://github.com/konveyor/tackle2-ui/pull/1781
# Builder image
FROM registry.access.redhat.com/ubi9/nodejs-20:9.5 as builder
USER 1001
COPY --chown=1001 . .
RUN \
npm version && \
npm config ls && \
npm clean-install --verbose --ignore-scripts --no-audit && \
npm run build && \
npm run dist
# Runner image
FROM registry.access.redhat.com/ubi9/nodejs-20-minimal:9.5
# Add ps package to allow liveness probe for k8s cluster
# Add tar package to allow copying files with kubectl scp
USER 0
RUN microdnf -y install tar procps-ng && microdnf clean all
USER 1001
LABEL name="konveyor/tackle2-ui" \
description="Konveyor for Tackle - User Interface" \
help="For more information visit https://konveyor.io" \
license="Apache License 2.0" \
maintainer="[email protected],[email protected]" \
summary="Konveyor for Tackle - User Interface" \
url="https://quay.io/konveyor/tackle2-ui" \
usage="podman run -p 80 -v konveyor/tackle2-ui:latest" \
com.redhat.component="konveyor-tackle2-ui-container" \
io.k8s.display-name="tackle2-ui" \
io.k8s.description="Konveyor for Tackle - User Interface" \
io.openshift.expose-services="80:http" \
io.openshift.tags="operator,konveyor,ui,nodejs18" \
io.openshift.min-cpu="100m" \
io.openshift.min-memory="350Mi"
COPY --from=builder /opt/app-root/src/dist /opt/app-root/dist/
ENV DEBUG=1
WORKDIR /opt/app-root/dist
ENTRYPOINT ["./entrypoint.sh"]