2022-05-06 08:50:50 +08:00
|
|
|
#MaxKey Frontend Docker Build
|
|
|
|
|
|
|
|
|
|
FROM node:16.14.2
|
|
|
|
|
|
2024-10-01 12:17:56 +08:00
|
|
|
LABEL authors="MaxKey <support@maxsso.net>"
|
2022-05-06 08:50:50 +08:00
|
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
|
|
COPY package.json package.json
|
|
|
|
|
|
|
|
|
|
RUN npm config set registry https://registry.npm.taobao.org \
|
|
|
|
|
&& npm i
|
|
|
|
|
|
|
|
|
|
COPY ./src ./src
|
|
|
|
|
RUN npm install -g @angular/cli
|
|
|
|
|
|
|
|
|
|
RUN ng build --prod --base-href /maxkey/
|
|
|
|
|
|
|
|
|
|
FROM nginx
|
|
|
|
|
|
|
|
|
|
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
|
|
|
|
|
|
#RUN rm -rf /usr/share/nginx/html/*
|
|
|
|
|
|
|
|
|
|
COPY dist /usr/share/nginx/html/maxkey
|
|
|
|
|
|
|
|
|
|
#CMD ["nginx", "-g", "daemon off;"]
|
|
|
|
|
|
2023-08-30 19:41:31 +08:00
|
|
|
EXPOSE 8527
|