Skip to content

Instantly share code, notes, and snippets.

@drc288
Last active January 24, 2022 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drc288/5b7917d11a11e0890e0a61e2293785db to your computer and use it in GitHub Desktop.
Save drc288/5b7917d11a11e0890e0a61e2293785db to your computer and use it in GitHub Desktop.
Docker windows
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
EXPOSE 80
EXPOSE 443
COPY cert/ C:\temp\
RUN Import-PfxCertificate -Exportable -filePath "C:\temp\myCert.pfx" -CertStoreLocation "Cert:\LocalMachine\My" -Password (ConvertTo-SecureString -String "" -Force -AsPlainText)
# COPY C:\\Users\\jesus\\Documents\\dev\\dock\\index.html c:\inetpub\wwwoot\index.html
# RUN New-SelfSignedCertificate -DnsName "servicesqa.acgeneral.siigo.com" -CertStoreLocation "cert:\LocalMachine\My"
RUN New-IISSiteBinding -Name (Get-IISSite).Name -BindingInformation "*:443:" -CertificateThumbPrint (Get-ChildItem Cert:\LocalMachine\My | where{$_.Subject -eq 'CN=siigo.com'}).Thumbprint -CertStoreLocation "cert:\LocalMachine\My" -Protocol https -SslFlag 0
ENTRYPOINT ["powershell.exe"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment