ZY Player Web项目:https://github.com/Hunlongyu/ZY-Player-Web
这是一个开源的m3u8 web播放器。我们基于这个项目进行打包
打包使用的Dockerfile文章来源:https://www.toymoban.com/news/detail-806443.html
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;'
打包和运行文章来源地址https://www.toymoban.com/news/detail-806443.html
docker build ./ -t zy-player-web:1.0.0
docker run -p 80:80 zy-player-web:1.0.0
到了这里,关于docker制作m3u8web播放器镜像基于nginx-alpine镜像的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!