generated from oracle-devrel/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix dockerfile for app in multi stange container
- Loading branch information
Showing
2 changed files
with
16 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
FROM nginx:1.23-alpine-slim | ||
FROM --platform=linux/amd64 node:18-slim AS builder | ||
|
||
RUN apk add --update nodejs npm | ||
WORKDIR /usr/src/app | ||
|
||
WORKDIR /usr/share/build | ||
RUN mkdir -p ./src \ | ||
&& mkdir -p ./scripts \ | ||
&& mkdir -p ./staged-themes | ||
|
||
RUN mkdir -p /usr/share/build/src \ | ||
&& mkdir -p /usr/share/build/scripts | ||
COPY src/ ./src/ | ||
COPY staged-themes/ ./staged-themes | ||
COPY scripts/ ./scripts/ | ||
COPY *.json ./ | ||
|
||
COPY src/ /usr/share/build/src/ | ||
|
||
COPY scripts/ /usr/share/build/scripts/ | ||
|
||
COPY *.json /usr/share/build/ | ||
RUN rm package-lock.json | ||
|
||
RUN npm install -g @oracle/[email protected] | ||
RUN npm install | ||
RUN npm install -g @oracle/ojet-cli | ||
RUN ojet build web --release | ||
RUN ojet build web --release | ||
|
||
FROM --platform=linux/amd64 nginx:1.23-alpine-slim | ||
|
||
RUN cp -R /usr/share/build/web/* /usr/share/nginx/html/ | ||
COPY --from=builder /usr/src/app/web/* /usr/share/nginx/html/ | ||
|
||
EXPOSE 80 | ||
|
||
|
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 |
---|---|---|
|
@@ -21,6 +21,7 @@ spec: | |
spec: | ||
containers: | ||
- image: app | ||
imagePullPolicy: "Always" | ||
name: app | ||
readinessProbe: | ||
httpGet: | ||
|