1 Star 0 Fork 1

xtzx/webrtc-streamer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile.windows 2.44 KB
一键复制 编辑 原始数据 按行查看 历史
mpromonet 提交于 2021-05-06 15:58 . update base image for windows container
# build
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 as builder
LABEL maintainer=michel.promonet@free.fr
WORKDIR /webrtc-streamer
COPY . /webrtc-streamer
SHELL ["cmd", "/S", "/C"]
ENV DEPOT_TOOLS_WIN_TOOLCHAIN=0 \
CLANG_VERSION=ToT \
PYTHONIOENCODING=UTF-8 \
MSVC_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
# Install Chocolatey & packages
RUN powershell.exe -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SETX PATH "%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
RUN choco install --no-progress -y 7zip git python2 curl sed
RUN choco install --no-progress -y cmake --installargs 'ADD_CMAKE_TO_PATH=System'
RUN choco install --no-progress -y windows-sdk-10-version-2004-all
RUN choco install --ignoredetectedreboot --no-progress -y visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended --nocache --installPath %MSVC_PATH%" || IF "%ERRORLEVEL%"=="3010" EXIT 0
RUN git config --global core.autocrlf false \
&& git config --global core.filemode false \
&& git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git C:\depot_tools \
&& SETX PATH "%PATH%;C:\depot_tools\;C:\webrtc\src\third_party\llvm-build\Release+Asserts\bin;C:\webrtc\src\build\toolchain\win\rc\win" \
&& refreshenv \
&& call "%MSVC_PATH%\VC\Auxiliary\Build\vcvars64.bat" \
&& time /t \
&& mkdir c:\webrtc && cd c:\webrtc \
&& fetch --no-history --nohooks webrtc \
&& time /t \
&& sed -i -e "s|'src/resources'],|'src/resources'],'condition':'rtc_include_tests==true',|" src/DEPS \
&& gclient sync \
&& time /t \
&& cd C:\webrtc-streamer \
&& cmake -G Ninja -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe . \
&& time /t \
&& ninja \
&& mkdir c:\app && copy webrtc-streamer.exe c:\app && copy config.json c:\app && xcopy /E html c:\app\html\ \
&& del /f /s /q c:\webrtc > nul && rmdir /s /q c:\webrtc \
&& time /t
# run
FROM mcr.microsoft.com/windows:1809
WORKDIR /app
COPY --from=builder /app/ /app/
RUN webrtc-streamer.exe -V
ENTRYPOINT [ "webrtc-streamer.exe" ]
CMD [ "-a", "-C", "config.json" ]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/smilejx001/webrtc-streamer.git
git@gitee.com:smilejx001/webrtc-streamer.git
smilejx001
webrtc-streamer
webrtc-streamer
master

搜索帮助