Skip to content

Commit 79c86cf

Browse files
committed
Update Dockerfile
1 parent 9b93ffd commit 79c86cf

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ RUN npm run build
1414

1515
FROM registry.access.redhat.com/ubi9/nodejs-18-minimal
1616

17-
RUN npm install -g serve
17+
WORKDIR /opt/app-root/src
18+
19+
COPY --from=build-stage /opt/app-root/src/.next/ /opt/app-root/src/.next/
20+
COPY --from=build-stage /opt/app-root/src/public/ /opt/app-root/src/public/
21+
COPY --from=build-stage /opt/app-root/src/package.json /opt/app-root/src/package.json
22+
COPY --from=build-stage /opt/app-root/src/package-lock.json /opt/app-root/src/package-lock.json
1823

19-
COPY --from=build-stage /opt/app-root/src/.next/ /opt/app-root/src
24+
RUN npm ci --production
2025

21-
EXPOSE 8080
26+
EXPOSE 3000
2227

23-
CMD serve -l 8080 -s /opt/app-root/src
28+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)