SyntaxFix
Write A Post
Hire A Developer
Questions
You can start your container with the flag -P. This "assigns" a random port to the exposed port of your image.
-P
With docker port <container id> you can see the randomly choosen port. Access is then possible via localhost:port.
docker port <container id>
localhost:port