generated from IBM/template-graphql-typescript
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
44 lines (30 loc) · 1.16 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
FROM registry.access.redhat.com/ubi9/nodejs-18:1-70.1695740477 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-18:1-70.1695740477
## 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-node-typescript" \
vendor="IBM" \
version="1" \
release="67" \
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"]
CMD [ "node", "dist/src/main.js" ]