ZY Player Web项目:https://github.com/Hunlongyu/ZY-Player-Web
这是一个开源的m3u8 web播放器。我们基于这个项目进行打包
打包使用的Dockerfile
FROM node:latest as builderWORKDIR applicationCOPY . . #RUN npm config set registry https://registry.npmmirror.com/RUN npm install yarnRUN yarn installRUN chmod +x node_modules/.bin/tscRUN chmod +x node_modules/.bin/viteRUN yarn build FROM nginx:alpineWORKDIR /usr/share/nginx/html/COPY --from=builder application/docs/ /usr/share/nginx/html/ CMD nginx -g 'daemon off;'
打包和运行
docker build ./ -t zy-player-web:1.0.0docker run -p 80:80 zy-player-web:1.0.0