forked from rancher/system-agent-installer-rke2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-windows.dapper
46 lines (36 loc) · 1.6 KB
/
Dockerfile-windows.dapper
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
ARG SERVERCORE_VERSION
FROM mcr.microsoft.com/windows/servercore:${SERVERCORE_VERSION} as download
SHELL ["powershell", "-NoLogo", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV ARCH amd64
# Create a symbolic link pwsh.exe that points to powershell.exe for consistency
RUN New-Item -ItemType SymbolicLink -Target "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -Path "C:\Windows\System32\WindowsPowerShell\v1.0\pwsh.exe"
RUN pushd c:\; \
$URL = 'https://github.com/StefanScherer/docker-cli-builder/releases/download/20.10.5/docker.exe'; \
\
Write-Host ('Downloading docker from {0} ...' -f $URL); \
curl.exe -sfL $URL -o c:\Windows\docker.exe; \
\
Write-Host 'Complete.'; \
popd;
# upgrade git
RUN pushd c:\; \
$URL = 'https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.2/MinGit-2.33.0.2-64-bit.zip'; \
\
Write-Host ('Downloading git from {0} ...' -f $URL); \
curl.exe -sfL $URL -o c:\git.zip; \
\
Write-Host 'Expanding ...'; \
Expand-Archive -Force -Path c:\git.zip -DestinationPath c:\git\.; \
\
Write-Host 'Cleaning ...'; \
Remove-Item -Force -Recurse -Path c:\git.zip; \
\
Write-Host 'Complete.'; \
popd;
ENV DAPPER_ENV REPO OS ARCH TAG DRONE_TAG LOCAL_ARTIFACTS DOCKER_USERNAME DOCKER_PASSWORD
ENV DAPPER_SOURCE /go/src/github.com/rancher/system-agent-installer-rke2/
ENV DAPPER_DOCKER_SOCKET true
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["powershell", "-NoLogo", "-NonInteractive", "-File", "./scripts/windows/entry.ps1"]
CMD ["build"]