How does shinyproxy work in conjunction with Docker

Hi there,

I have already spent a lot of time trying to get my head around the ins and outs of shinyproxy, from the documentation and various other sources (stack overflow, blog posts, docker documentation etc). I have even got it running with nginx and a custom domain name on Digital Ocean by following the documentation. However, what is bothering me is whether I have the schema correct in how this all fits/works together in a cloud production setting.

My main hang up is docker and its function. Some tutorials online seem to suggest that even components such as the reverse proxy are in a docker container and everything but the OS is in a docker container (see here and here, but the main documentation and other blog posts don’t seem to suggest this to be the case.

I have created a diagram that communicates how I currently think these components fit together, and I am looking for some feedback as to whether this is correct or not, and if not, why. My belief in summary is that ShinyProxy interacts/communicates with the docker engine, the docker engine then spins up the application containers.

Thank you in advance for any advice, if anything isn’t clear please say and I will try to rephrase.

Ben

1 Like

Hi @polus

Indeed, ShinyProxy communicates with the Docker engine in order to launch the configured applications. It will launch a new docker container every time a user opens a new app. So if you have two apps configured and three users each open one app, you will have three containers running. If all three users each open both apps, you’ll have 6 apps running.

Docker is a general-purpose tool, it allows you to run any Docker container and it doesn’t care what is running inside that container. In addition, Docker allows various ways to launch these Docker containers. For example, using the Docker CLI or using the API (which ShinyProxy uses). This means that in addition to the containers that are launched by ShinyProxy, you are free to launch other containers. This also means that you can run Nginx or ShinyProxy as a container itself. This allows you to easily manage everything through Docker, but it isn’t a requirement.

So to conclude, you are free to run nginx on your host system (e.g. Ubuntu) but you can also run it as a Docker container.

Hi @tdekoninck, thank you, that’s a really helpful answer that clears things up for me, and makes a lot of sense.

1 Like