Skip to content

Commit

Permalink
support/docker_power_angular...
Browse files Browse the repository at this point in the history
  • Loading branch information
pubaayaam committed Feb 10, 2024
1 parent b5d5feb commit d9a2714
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
38 changes: 38 additions & 0 deletions dockerfile
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"]
18 changes: 18 additions & 0 deletions dockerfile.build
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"]
5 changes: 5 additions & 0 deletions entry.point
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

service nginx start &
/bin/bash

0 comments on commit d9a2714

Please sign in to comment.