How can I use IdentityServer4 from inside and outside a docker machine?

I’m trying to use Identity Server 4 in docker ( core on linux) and to do so I need to set up the Authority, which is the URL that tokens are checked against. I think my problem is that I’ve not set up the network so that the API container can access the Identity Server API using the same URL as the outside client can.

I wrote it up in full (with a picture!) on Stack Overflow.

All help very much appreciated. Many thanks in advance.