Skip to content

Instantly share code, notes, and snippets.

@joeapearson
joeapearson / Dockerfile
Created October 30, 2018 22:18
Passing build args to RUN instructions in Windows Dockerfiles
FROM microsoft/nanoserver
ARG MyArg=MyDefaultValue
# Default cmd.exe shell
RUN echo %MyArg%
SHELL ["powershell"]
# Or with PowerShell
@joeapearson
joeapearson / http.ps1
Created November 1, 2018 16:50
Make an HTTPS call from PowerShell
# Have to do this first otherwise you get connection dropped errors
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-RestMethod -Uri "https://example.com" -Method Post -ContentType 'multipart/form-data' -Body @{ key1 = 'value'; key2 = 'value' }