fix(dockerfile): 设置 NCMAPI 版本 (#1689)

* fix: dockerfile ncapi pinning

* feat: ncmapi follows version in package.json
This commit is contained in:
Viyerelu23333 2022-06-19 08:54:08 -04:00 committed by GitHub
parent 000cfda922
commit a31d552788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,9 +37,11 @@ RUN echo $'server { \n\
} \n\
}' > /etc/nginx/conf.d/default.conf
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main libuv \
COPY --from=build /app/package.json /usr/local/lib/
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main libuv jq \
&& apk add --no-cache --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main nodejs npm \
&& npm i -g NeteaseCloudMusicApi
&& npm i -g NeteaseCloudMusicApi@"$(jq -r '.dependencies.NeteaseCloudMusicApi' /usr/local/lib/package.json)"
COPY --from=build /app/dist /usr/share/nginx/html