|
1 | | -FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim |
| 1 | +FROM mcr.microsoft.com/dotnet/sdk:8.0-noble |
2 | 2 |
|
3 | 3 | # Add dotnet tools to path. |
4 | 4 | ENV PATH="${PATH}:/root/.dotnet/tools" |
5 | 5 |
|
| 6 | +# Set Node.js path |
| 7 | +ENV PLAYWRIGHT_NODEJS_PATH="/usr/bin/node" |
| 8 | + |
6 | 9 | # Set target docfx version. |
7 | | -ARG DOCFX_VERSION=2.77.0 |
| 10 | +ARG DOCFX_VERSION=2.78.1 |
8 | 11 |
|
9 | 12 | # Install DocFX as a dotnet tool. |
10 | 13 | RUN dotnet tool install docfx -g --version ${DOCFX_VERSION} && \ |
11 | 14 | docfx --version && \ |
12 | 15 | rm -f /root/.dotnet/tools/.store/docfx/${DOCFX_VERSION}/docfx/${DOCFX_VERSION}/docfx.nupkg && \ |
13 | 16 | rm -f /root/.dotnet/tools/.store/docfx/${DOCFX_VERSION}/docfx/${DOCFX_VERSION}/docfx.${DOCFX_VERSION}.nupkg && \ |
14 | | - rm -rf /root/.dotnet/tools/.store/docfx/${DOCFX_VERSION}/docfx/${DOCFX_VERSION}/tools/net6.0 |
15 | | - |
16 | | -# Install Node.js and dependences for chromium PDF. |
17 | | -RUN apt-get update -qq && \ |
18 | | - apt-get install -y -qq --no-install-recommends \ |
19 | | - nodejs \ |
20 | | - libglib2.0-0 libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \ |
21 | | - libdbus-1-3 libxcb1 libxkbcommon0 libatspi2.0-0 libx11-6 libxcomposite1 libxdamage1 \ |
22 | | - libxext6 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2 && \ |
23 | | - rm -rf /var/lib/apt/lists/* /tmp/* |
| 17 | + rm -rf /root/.dotnet/tools/.store/docfx/${DOCFX_VERSION}/docfx/${DOCFX_VERSION}/tools/net9.0 |
24 | 18 |
|
25 | | -# Install Chromium. |
26 | | -RUN PLAYWRIGHT_NODEJS_PATH="/usr/bin/node" && \ |
27 | | - ln -s /root/.dotnet/tools/.store/docfx/${DOCFX_VERSION}/docfx/${DOCFX_VERSION}/tools/.playwright /root/.dotnet/tools/.store/docfx/${DOCFX_VERSION}/docfx/${DOCFX_VERSION}/tools/net8.0/any/.playwright && \ |
28 | | - pwsh -File /root/.dotnet/tools/.store/docfx/${DOCFX_VERSION}/docfx/${DOCFX_VERSION}/tools/net8.0/any/playwright.ps1 install chromium && \ |
29 | | - unlink /root/.dotnet/tools/.store/docfx/${DOCFX_VERSION}/docfx/${DOCFX_VERSION}/tools/net8.0/any/.playwright |
| 19 | +# Install Node.js and browser(chromium) with dependencies |
| 20 | +RUN apt-get install -y -qq --update --no-install-recommends nodejs && \ |
| 21 | + pwsh -File /root/.dotnet/tools/.store/docfx/${DOCFX_VERSION}/docfx/${DOCFX_VERSION}/tools/net8.0/any/playwright.ps1 install --with-deps chromium && \ |
| 22 | + rm -rf /var/lib/apt/lists/* && \ |
| 23 | + rm -rf /tmp/* |
30 | 24 |
|
31 | 25 | WORKDIR /opt/prj |
32 | 26 | VOLUME [ "/opt/prj" ] |
|
0 commit comments