Skip to content

Commit 5e2f9cb

Browse files
committed
CI: add a Windows Docker example
1 parent 81b6122 commit 5e2f9cb

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

web/docs/ci.md

+21
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,27 @@ $env:MSYSTEM = 'MINGW64' # Start a 64 bit Mingw environment
6060
C:\msys64\usr\bin\bash -lc "./ci-build.sh"
6161
```
6262

63+
## Docker
64+
65+
Install MSYS2 under `C:\msys64` into a Windows based Docker image:
66+
67+
```docker
68+
# select as base image matching your host to get process isolation
69+
FROM mcr.microsoft.com/windows/servercore:2004
70+
71+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
72+
73+
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
74+
Invoke-WebRequest -UseBasicParsing -uri "https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe" -OutFile msys2.exe; \
75+
.\msys2.exe -y -oC:\; \
76+
Remove-Item msys2.exe ; \
77+
function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
78+
msys ' '; \
79+
msys 'pacman --noconfirm -Syuu'; \
80+
msys 'pacman --noconfirm -Syuu'; \
81+
msys 'pacman --noconfirm -Scc';
82+
```
83+
6384
## Other Systems
6485

6586
On systems that don't provide MSYS2 integration you need to install and update

0 commit comments

Comments
 (0)