This is my docker compose file:
version: '3.4'
services:
appone.api:
image: ${DOCKER_REGISTRY-}apponeapi
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+:443;http://+:80
- ASPNETCORE_Kestrel__Certificates__Default__Password=
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/AppOne.Api.pfx
build:
context: .
dockerfile: AppOne.Api/Dockerfile
networks:
- ${NETWORK}
ports:
- "59541:80"
- "59542:443"
volumes:
- ~/.aspnet/https:/https:ro
networks:
dev-network:
name: ${NETWORK}
When I try to connect to https://localhost:59542/values via Postman, it will fail saying
Error: Client network socket disconnected before secure TLS connection was established
This is how I start it:
docker-compose -f docker-compose.yml up --force-recreate --build -d
docker image prune -f
Am I missing something? If I remove https://+443 and the port 443 reference, I am able to connect using http only via port 59541