Comments (2)
From: https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-10/http2-on-iis
[[
On the server, IIS running on Windows 10 or Windows Server 2016 supports HTTP/2.
IIS currently supports HTTP/2 only over TLS. When making an HTTPS connection to a web server running IIS on Windows 10, HTTP/2 is used if the client and server both support it. In IIS, we've implemented HTTP/2 as transparently as possible - you shouldn't need to change anything in your application for HTTP/2 to work. Certain HTTP/1.1 optimizations (domain sharding, inlining, etc.) are no longer recommended in HTTP/2, though, so you should plan to remove these in the future.
]]
A sample docker file that can be used for creating a https binding is attached.
dockerfile.txt
The docker file is going to copy setup.ps1 from the content folder of the host's root drive and then invoke setup.ps1 powershell from there. Setup.ps1 can be any script that creates a https binding on a given IIS site. A reference script is attached.
The reference script gets its parametrized input (for e.g. site name) from the environment variables passed in to the docker image at runtime. The certificate PFX file for the https binding is read either from the environment variable (if the pfx file is available in host directory mounted into the container) or from a AKV secret name passed in as an environment variable.
Let me know if you have any questions.
from iis-docker.
A sample docker run command line would look like:
docker run -it -p 8000:80 -p 8001:443 --name myiiscontainer -v c:\workdir:c:\workdir --env-file c:\env.txt IMAGE
Here c:\workdir on the host machine is mounted into the container and contains a PFX certificate file.
Env.txt would have the following variables:
ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
PFX_FILE=c:\workdir\server.pfx
SECRET_NAME=CertPassword
SITE_NAME=Default Web Site
VAULT_NAME=VAULT
If the certificate PFX is password protected, SECRET_NAME is the name of the secret in AKV and ACCESS_TOKEN is the access token for AKV.
from iis-docker.
Related Issues (20)
- Environment variables not set if call early HOT 1
- HTTP Error 403.16 - Forbidden for first 5 minutes container is up HOT 2
- "verify in the browser" wrong instructions HOT 1
- change the default website
- Non-root user not able to start w3svc service in docker HOT 3
- Unable to enable SSL binding of the website after applying KB5001384 HOT 3
- Cannot load container in Docker on Mac OS HOT 1
- Docker build fails for ltsc2019 HOT 3
- IIS Servicemonitor crashes when %18 is used in environment variable HOT 2
- FROM mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2022 HOT 1
- Several service failed to start within the IIS docker image
- Failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0
- Default App Pool crashes when enabling 32 bit support HOT 1
- Windows License Activation failed in image aspnet:4.8 HOT 2
- Execute script for dynamic content
- This repo is missing important files HOT 1
- Unable to use IIS: drive in powershell
- Is this repository active? HOT 3
- It doesn't work after I installed hosting bundle 8.0.1, the application show error: Could not find dotnet.exe at 'c:\inetpub\wwwroot\api\dotnet' or using the system PATH environment variable. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iis-docker.