-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile
44 lines (29 loc) · 1.13 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
FROM registry.access.redhat.com/ubi9/nodejs-22:9.5-1736454190 AS builder
WORKDIR /opt/app-root/src
COPY --chown=default:root . .
RUN mkdir -p /opt/app-root/src/node_modules && \
ls -lA && \
npm ci && \
npm run build
FROM registry.access.redhat.com/ubi9/nodejs-22-minimal:9.5-1736731764
## Uncomment the below lines to update image security content if any
# USER root
# RUN dnf -y update-minimal --security --sec-severity=Important --sec-severity=Critical && dnf clean all
LABEL name="ibm/template-graphql-typescript" \
vendor="IBM" \
version="9" \
release="5" \
summary="This is an example of a container image." \
description="This container image will deploy a Typescript Node App"
WORKDIR /opt/app-root/src
COPY --from=builder --chown=1001:root /opt/app-root/src/dist dist
COPY --chown=1001:root package*.json ./
RUN ls -lA && \
mkdir -p /opt/app-root/src/node_modules && \
npm ci --only=production
COPY --chown=1001:root licenses licenses
COPY --chown=1001:root public public
# COPY --chown=1001:root licenses /licenses
ENV HOST=0.0.0.0 PORT=3000
EXPOSE 3000/tcp
CMD ["npm", "run", "start"]