-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 773 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 773 Bytes
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
FROM registry.access.redhat.com/ubi9/nodejs-22:latest as builder
COPY \
app.js \
package.json \
package-lock.json \
start.sh \
/opt/app-root/src/
# If we combine this with the command above, the contents of the
# directory are copied instead of the full directory.
COPY html /opt/app-root/src/html
# Required for the `chmod` and the `npm install` command.
USER root
RUN chmod 777 html && npm install --only=production
FROM registry.access.redhat.com/ubi9/nodejs-22-minimal:latest
COPY --from=builder /opt/app-root/src /opt/app-root/src
# Configure and document the service HTTP port.
ENV PORT 8080
EXPOSE $PORT
ENV GIT_REPO=unknown
ENV DEBUG=express:*
# Run the web service on container startup.
CMD [ "/bin/sh", "/opt/app-root/src/start.sh" ]