Accessing 172. network from Docker container

I’m new to Docker. After downloading a container (sagemath) and running it, I get a console message that says I can connect using a URL on network. However, when I try from a browser on the host Mac, it does not connect. What am I missing?

Probably, publised a port of your container to the host and using localhost in the URL? The URL would look like this http://localhost:{published host port}/?token=XXX.

That doesn’t work either.

did you publish the port (as in map a host port to a container port)?

Sorry, but how is that done? (I thought that having the networks bridged was enough).

A Docker bridged network is comparable to a NAT network in Virtual Box / VMware Fusion - both worlds require you to map ports from the host to the container/vm to access one of its ports from the host.

Wherever you configure your environment variables and volumes must be a setting to publish/map ports.

Sorry, no Docker-CE UI experience on my side.