mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2024-11-22 12:32:07 +08:00
refactor(dockerfile): use awk
to find NCMAPI version
This commit is contained in:
parent
9fcb6da960
commit
70d2713643
|
@ -39,9 +39,10 @@ RUN echo $'server { \n\
|
|||
|
||||
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 \
|
||||
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main libuv \
|
||||
&& apk add --no-cache --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main nodejs npm \
|
||||
&& npm i -g NeteaseCloudMusicApi@"$(jq -r '.dependencies.NeteaseCloudMusicApi' /usr/local/lib/package.json)"
|
||||
&& npm i -g $(awk -F \" '{if($2=="NeteaseCloudMusicApi") print $2"@"$4}' /usr/local/lib/package.json) \
|
||||
&& rm -f /usr/local/lib/package.json
|
||||
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user