ZY Player Web项目:https://github.com/Hunlongyu/ZY-Player-Web

这是一个开源的m3u8 web播放器。我们基于这个项目进行打包

打包使用的Dockerfile

FROM node:latest as builder
WORKDIR application
COPY . . 
#RUN npm config set registry https://registry.npmmirror.com/
RUN npm install yarn
RUN yarn install
RUN chmod +x node_modules/.bin/tsc
RUN chmod +x node_modules/.bin/vite
RUN yarn build
 
FROM nginx:alpine
WORKDIR /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.0
docker run -p 80:80 zy-player-web:1.0.0

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐