Skip to content

Commit

Permalink
Configure CI (no. 98)
Browse files Browse the repository at this point in the history
  • Loading branch information
cafour committed May 7, 2021
1 parent 94f02ae commit b164c23
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
22 changes: 17 additions & 5 deletions Dockerfile
@@ -1,15 +1,26 @@
# escape=`
FROM mcr.microsoft.com/dotnet/sdk:3.1 as dotnet-installer


# export fonts from full-windows (based on https://stackoverflow.com/a/65655141)
FROM mcr.microsoft.com/windows:20H2 as full-windows
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN Copy-Item -Path C:\Windows\Fonts -Exclude lucon.ttf -Destination C:\tmp\fonts -Recurse; `
New-Item -ItemType Directory -Force -Path C:\tmp\registries; `
reg export 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts' C:\tmp\registries\Fonts.reg; `
reg export 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink' C:\tmp\registries\FontLink.reg;


FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019

RUN Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
# import fonts from full-windows
COPY --from=full-windows /tmp/fonts/ /Windows/Fonts/
COPY --from=full-windows /tmp/registries/ /tmp/registries/
RUN reg import C:\tmp\registries\Fonts.reg; reg import C:\tmp\registries\FontLink.reg;

RUN scoop config shim kiennq
RUN Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')

RUN scoop install git; `
scoop bucket add extras; `
scoop install googlechrome chromedriver
RUN choco install -y googlechrome chromedriver

COPY --from=dotnet-installer ["/Program Files/dotnet", "/Program Files/dotnet"]

Expand All @@ -19,5 +30,6 @@ RUN dotnet help
ENTRYPOINT []



COPY artifacts/DotVVM.Samples.BasicSamples.Owin /inetpub/dotvvm.owin
COPY src/DotVVM.Samples.Common /inetpub/DotVVM.Samples.Common
2 changes: 1 addition & 1 deletion ci/windows/BuildLocal.ps1
@@ -1,7 +1,7 @@
$root = [System.IO.Path]::GetFullPath((Join-Path $PSScriptRoot ..\..))

$env:DOTVVM_ROOT = $root
git clean -dfx $root\src
git clean -dfx $root -e .vscode
cd $root\src\DotVVM.Framework `
&& npm ci `
&& npm run build `
Expand Down

0 comments on commit b164c23

Please sign in to comment.