forked from netobserv/network-observability-console-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Building frontend only once (netobserv#718)
- Loading branch information
1 parent
3468c48
commit f0931f3
Showing
3 changed files
with
77 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM registry.access.redhat.com/ubi9/nodejs-18:1-108.1716477799 as web-builder | ||
|
||
ARG BUILDSCRIPT | ||
WORKDIR /opt/app-root | ||
|
||
COPY --chown=default web/package.json web/package.json | ||
COPY --chown=default web/package-lock.json web/package-lock.json | ||
WORKDIR /opt/app-root/web | ||
|
||
RUN CYPRESS_INSTALL_BINARY=0 node --max-old-space-size=6000 $(which npm) --legacy-peer-deps ci | ||
|
||
WORKDIR /opt/app-root | ||
COPY --chown=default web web | ||
COPY --chown=default mocks mocks | ||
|
||
WORKDIR /opt/app-root/web | ||
RUN npm run format-all | ||
RUN npm run build$BUILDSCRIPT | ||
|
||
FROM scratch | ||
|
||
COPY --from=web-builder /opt/app-root/web/dist /opt/app-root/web/dist |