pms/web/Dockerfile

19 lines
539 B
Docker

FROM alpine:latest
WORKDIR /gva_web/
COPY . .
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add npm
RUN npm config set registry https://mirrors.huaweicloud.com/repository/npm/
RUN npm install
RUN npm run build
FROM nginx:alpine
LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"
COPY .docker-compose/nginx/conf.d/my.conf /etc/nginx/conf.d/my.conf
COPY --from=0 /gva_web/dist /usr/share/nginx/html
RUN cat /etc/nginx/nginx.conf
RUN cat /etc/nginx/conf.d/my.conf
RUN ls -al /usr/share/nginx/html