You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
33 lines
1.0 KiB
FROM registry.datameta.com:8180/public/node:17.9.1-alpine3.15 as builder
|
|
WORKDIR /root
|
|
COPY . /root
|
|
# RUN npm
|
|
ENV NODE_OPTIONS '--openssl-legacy-provider --max-old-space-size=8000'
|
|
|
|
RUN set -x \
|
|
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
|
|
&& apk --no-cache add python2 make g++ && npm config set strict-peer-dependencies=false && \
|
|
npm install --ignore-optional --registry=http://172.16.32.57:8931/repository/npm-group/ --verbose --legacy-peer-deps && \
|
|
npm run build
|
|
|
|
# RUN yarn config set strict-peer-dependencies false && \
|
|
# yarn config set registry http://172.16.32.57:8931/repository/npm-group/ && \
|
|
# yarn && \
|
|
# yarn run build:pro
|
|
|
|
# Second stage: minimal runtime environment
|
|
FROM registry.datameta.com:8180/public/nginx:1.25-alpine
|
|
|
|
COPY --from=builder /root/dist /usr/share/nginx/html
|
|
|
|
WORKDIR /
|
|
|
|
COPY deploy/nginx.conf.tmpl nginx.conf.tmpl
|
|
|
|
COPY /deploy/entryPoint.sh entryPoint.sh
|
|
RUN chmod +x entryPoint.sh
|
|
|
|
# expose port
|
|
EXPOSE 80
|
|
|
|
ENTRYPOINT ["sh","/entryPoint.sh"]
|
|
|