-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
61 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM debian:bookworm as build | ||
WORKDIR /home/pubaayaam/ | ||
|
||
RUN apt update -y && \ | ||
apt install nodejs -y && \ | ||
apt install npm -y && \ | ||
npm install -g yarn | ||
|
||
RUN apt install telnet procps lsof -y | ||
|
||
RUN npm install -g @angular/cli | ||
|
||
WORKDIR /home/pubaayaam/ng-bootstrap | ||
COPY . . | ||
RUN npm install @ng-bootstrap/ng-bootstrap --legacy-peer-deps | ||
RUN yarn install | ||
RUN npm run build | ||
|
||
# Stage 2: Serve app with nginx server | ||
|
||
# Use official nginx image as the base image | ||
FROM nginx:latest | ||
|
||
# Copy the build output to replace the default nginx contents. | ||
RUN mkdir -p /usr/share/nginx/html/img | ||
COPY --from=build /home/pubaayaam/ng-bootstrap/demo/src/public/img/* /usr/share/nginx/html/img | ||
COPY --from=build /home/pubaayaam/ng-bootstrap/demo/dist/* /usr/share/nginx/html | ||
|
||
# Expose port 80 | ||
EXPOSE 80 | ||
|
||
# devops~cloudops | ||
RUN apt update -y && \ | ||
apt install telnet procps lsof -y | ||
|
||
COPY entry.point . | ||
RUN chmod +x entry.point | ||
ENTRYPOINT ["./entry.point"] |
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,18 @@ | ||
FROM debian:bookworm as build | ||
WORKDIR /home/pubaayaam/ | ||
|
||
RUN apt update -y && \ | ||
apt install nodejs -y && \ | ||
apt install npm -y && \ | ||
npm install -g yarn | ||
|
||
RUN apt install telnet procps lsof -y | ||
|
||
RUN npm install -g @angular/cli | ||
|
||
WORKDIR /home/pubaayaam/ng-bootstrap | ||
COPY . . | ||
RUN npm install @ng-bootstrap/ng-bootstrap --legacy-peer-deps | ||
RUN yarn install | ||
RUN npm run build | ||
CMD ["tail", "-f","/dev/null"] |
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,5 @@ | ||
#!/bin/sh | ||
|
||
service nginx start & | ||
/bin/bash | ||
|