fix: docker build image error (#1212) (#1216)

This commit is contained in:
Rick 2022-01-11 19:07:48 +08:00 committed by GitHub
parent d4ca9d6dcf
commit c7c6583523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,11 @@
FROM node:lts-alpine as build FROM node:16.13.1-alpine as build
ENV VUE_APP_NETEASE_API_URL=/api ENV VUE_APP_NETEASE_API_URL=/api
WORKDIR /app WORKDIR /app
COPY . . COPY . .
RUN apk add --no-cache python3 make g++
RUN yarn && yarn build RUN yarn && yarn build
FROM nginx:alpine as app FROM nginx:1.20.2-alpine as app
COPY --from=build /app/dist /usr/share/nginx/html COPY --from=build /app/dist /usr/share/nginx/html
COPY --from=build /app/netease_api /usr/src/netease_api COPY --from=build /app/netease_api /usr/src/netease_api
WORKDIR /usr/src/netease_api WORKDIR /usr/src/netease_api