title: How to write docker-compose file correctly
body: <p>I've created asp.net core MVC app. Configured selfsigned certificate to connect using https and ran it in docker container using this command</p>
  <pre><code>docker run --rm -it -p 5000:80 -p 5001:443 -e ASPNETCORE_URLS=&quot;https://+;http://+&quot; -e ASPNETCORE_HTTPS_PORT=5001 -e ASPNETCORE_Kestrel__Certificates__Default__Password=&quot;password&quot; -e ASPNETCORE_Kestrel__Certificates__Default__Path=/https/identitycert.pfx -v ${HOME}/.aspnet/https:/https/ kirillbasic/identityserver
  </code></pre>
  <p>I can easily connect to my localhost. But then i tried to use docker-compose.yaml file which looks like this</p>
  <pre><code>services:
   identityserver:
    image: kirillbasic/identityserver:test
    ports: 
     - &quot;4999:80&quot;
     - &quot;5000:433&quot;
    environment:
     ASPNETCORE_URLS: https://+;http://+
     ASPNETCORE_HTTPS_PORT: 5000
     ASPNETCORE_Kestrel__Certificates__Default__Password: password
     ASPNETCORE_Kestrel__Certificates__Default__Path: /https/identitycert.pfx
    volumes: [&quot;${HOME}/.aspnet/https:/https/&quot;]
  </code></pre>
  <p>I get &quot;secure connection failed&quot;. I tried different ways of typing: with brackets and without them but nothing helps. Does anybody have any suggestions why does it happen and how can i fix this?</p>