This project demonstrates how to use Docker to setup and run a simple IdentityServer4 application over ssl. The project uses the Identity Server 4 Quickstart UI and replaces the in-memory clients with an Entity Framework backing store using SQL Server.
To run the application over SSL there are a few steps we need to do. In your app root directory run the following commands:
dotnet dev-certs https --clean
dotnet dev-certs https -ep ./conf.d/https/dev_cert.pfx -p <password-i-want-to-use>
dotnet dev-certs https --trust
- Ensure that the dev_cert.pfx file is available in ./conf.d/https folder.
- In your docker-compose.override file update the enviroment variable
ASPNETCORE_Kestrel__Certificates__Default__Password=<password-i-want-to-use>
to match the password you entered in step 2.
- Make sure you have Docker installed from Docker Official Page
- In your app root directory run the following command
docker-compose build
- In your app root directory run the following command
docker-compose up
- Running
docker ps
should now show you two containersidentityserver
andmcr.microsoft.com/mssql/server
with their associated port numbers. - Browse locally to the
identityserver
port to see theWelcome to IdentityServer4
page. - Log in with the test users credentials
alice/alice
orbob/bob
The solution also includes the added container orchestration support files. Fore more information see Container Tools in Visual Studio
For issues, use the identity-server4-docker-support issue tracker.