ZY Player Web項目:https://github.com/Hunlongyu/ZY-Player-Web
這是一個開源的m3u8 web播放器。我們基于這個項目進行打包
打包使用的Dockerfile文章來源:http://www.zghlxwxcb.cn/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;'
打包和運行文章來源地址http://www.zghlxwxcb.cn/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鏡像的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!