使用 HTTPS 通過帶證書運行容器
This article was translated from English: Does it need improvement?
TranslatedView the article in English
如果您需要使用憑證運行容器,請按照以下步驟生成憑證並配置本地機器:
執行帶有憑證的 IronSecureDoc 容器
- 生成證書:
dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\ironsecuredoc.pfx -p <CREDENTIAL_PLACEHOLDER>
dotnet dev-certs https --trust
將 <CREDENTIAL_PLACEHOLDER>
替換為密碼。
- 運行 Docker 容器:
docker container run -d -p 8081:8081 -p 8080:8080 -e HTTP_PORTS=8080 -e HTTPS_PORTS=8081 -e IronSecureDoc_LicenseKey=<IRONSECUREDOC_LICENSE_KEY> -e ENVIRONMENT=Production -v %USERPROFILE%\.aspnet\https:/https:ro -e CERTIFICATE_PATH=%USERPROFILE%\.aspnet\https\ironsecuredoc.pfx -e CERTIFICATE_PASSWORD=<CERTIFICATE_PASSWORD> ironsoftwareofficial/ironsecuredoc:latest
將 <IRONSECUREDOC_LICENSE_KEY>
和 <CERTIFICATE_PASSWORD>
替換為您實際的 IronSecureDoc 許可證密鑰和證書密碼。