Skip to content

lucvo/identityserver4.on.docker.with.https

Repository files navigation

identityserver4.on.docker.with.https

this sample demo for identityserver4 run on docker with self-sign certificate

dockerfile

FROM microsoft/aspnetcore:2.0
ARG source
WORKDIR /app
ENV certPassword pass@word

#Use opnssl to generate a self signed certificate cert.pfx with password $env:certPassword RUN openssl genrsa -des3 -passout pass:${certPassword} -out server.key 2048
RUN openssl rsa -passin pass:${certPassword} -in server.key -out server.key
RUN openssl req -sha256 -new -key server.key -out server.csr -subj '/CN=localhost'
RUN openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt
RUN openssl pkcs12 -export -out ./cert.pfx -inkey server.key -in server.crt -certfile server.crt -passout pass:${certPassword}

#Expose port 443 for the application. EXPOSE 443
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", "QuickstartIdentityServer.dll"]

References

About

this sample demo for identityserver4 run on docker with self-sign certificate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages