forked from IBM/template-node-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (32 loc) · 1.1 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
FROM registry.access.redhat.com/ubi8/nodejs-12:1-77.1618436962 AS builder
WORKDIR /opt/app-root/src
RUN mkdir client
COPY --chown=default:root client client
COPY client/package*.json client/
COPY package*.json ./
RUN npm ci
WORKDIR /opt/app-root/src/client
RUN npm ci && npm run build
FROM registry.access.redhat.com/ubi8/nodejs-12:1-77.1618436962
WORKDIR /opt/app-root/src
COPY --from=builder /opt/app-root/src/client/build client/build
COPY public public
COPY server server
COPY client/package*.json client/
COPY package.json .
RUN npm install --production
ENV NODE_ENV=production
ENV HOST=0.0.0.0 PORT=3000
EXPOSE 3000/tcp
## Uncomment the below line to update image security content if any
# USER root
# RUN dnf -y update-minimal --security --sec-severity=Important --sec-severity=Critical && dnf clean all
COPY ./licenses /licenses
USER default
LABEL name="ibm/template-node-react" \
vendor="IBM" \
version="1" \
release="77.1618436962" \
summary="This is an example of a container image." \
description="This container image will deploy a React Node App"
CMD ["npm", "start"]