This creates a container, but the recommended method of retrieving the url (i.e., Docker Toolbox) is deprecated.
I have tried using this method from Stack to get the URL but no RStudio session appeared when I entered the output in the form of http://172.17.0.3:8787 in my browser.
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:
As an additional tidbit here, the -p 8787:8787 is responsible for this. It says "map my local port 8787 to port 8787 on the container". For instance, if you used -p 8888:8787, then you would access the browser at http://localhost:8888
Also, docker inspect container_name is a handy way to get lots of information about the container The IP doesn't help a bunch in this case because often the docker network is a different one than your browser is using (of course, that is all configurable, but is complicated).
In any case, suffice it to say that -p someport:serviceport is your friend when you need to access a service running in docker locally!
If you are interested in developing a R project inside RStudio server in a Docker container, maybe package {devindocker} can interest you. This allows to launch a Docker for a specific project and you can manage libraries installation persistently using {renv}.