Giter Site home page Giter Site logo

Comments (2)

sujitnayak avatar sujitnayak commented on June 11, 2024

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.

setup.ps1.txt

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.

sujitnayak avatar sujitnayak commented on June 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.