Skip to content

Commit 51d6b00

Browse files
Frank MaiAlena Prokharchyk
authored andcommitted
Download Azure client on Windows
1 parent 73201ec commit 51d6b00

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Dockerfile.windows

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ RUN $URL = ('https://dl.k8s.io/{0}/kubernetes-node-windows-amd64.tar.gz' -f $env
4949

5050
FROM mcr.microsoft.com/powershell:nanoserver-${SERVERCORE_VERSION}
5151
USER ContainerAdministrator
52+
SHELL ["pwsh.exe", "-NoLogo", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
53+
RUN $URL = 'https://github.com/thxCode/rancher-azure-cli/releases/download/v2.0.69/azure-cli.zip'; \
54+
\
55+
Write-Host ('Downloading azure-cli from {0} ...' -f $URL); \
56+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
57+
Invoke-WebRequest -UseBasicParsing -OutFile c:\azure-cli.zip -Uri $URL; \
58+
\
59+
Write-Host 'Expanding ...'; \
60+
Expand-Archive -Force -Path c:\azure-cli.zip -DestinationPath c:\azure-cli; \
61+
Remove-Item -Force -Path c:\azure-cli.zip; \
62+
\
63+
Write-Host 'Complete.'
5264
COPY --from=builder /Windows/System32/netapi32.dll /Windows/System32/
5365
COPY --from=builder /kubernetes/node/bin/kubectl.exe /Windows
5466
COPY --from=builder /kubernetes/node/bin/kubelet.exe /kubernetes/node/bin/kube-proxy.exe /etc/kubernetes/bin/

0 commit comments

Comments
 (0)