feat: fixes docker build
This commit is contained in:
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
.github
|
||||||
|
.gitignore
|
||||||
|
Dockerfile
|
||||||
|
README.md
|
||||||
22
Dockerfile
22
Dockerfile
@@ -1,16 +1,30 @@
|
|||||||
FROM node:18-alpine
|
FROM node:22.12-alpine AS base
|
||||||
|
|
||||||
|
FROM base AS build
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
|
||||||
|
FROM base AS prod
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=build /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
|
||||||
|
RUN npm install -g @angular/cli@20.3.8
|
||||||
|
|
||||||
|
|
||||||
RUN apk add --update gettext python3 py3-pip py3-setuptools make g++ && \
|
RUN apk add --update gettext python3 py3-pip py3-setuptools make g++ && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
RUN npm install
|
|
||||||
RUN npm install -g @angular/cli@16
|
|
||||||
|
|
||||||
RUN npm run build:prod
|
RUN npm run build:prod
|
||||||
|
|
||||||
EXPOSE 5000-7000
|
EXPOSE 5000-7000
|
||||||
|
|
||||||
CMD ["npm", "run", "start:prod"]
|
CMD ["npm", "run", "start:prod"]
|
||||||
|
|||||||
Reference in New Issue
Block a user