Running container locally not working

I’m new to ShinyProxy, thus I succeded installing it to my Linux server and got a first example app running. For this I followed the OpenAnalytics instructions.
Now I want to deploy my first own app. I wrote a dockerfile following the instructions from the website ( The image built successfully and the container is also starting. I can see in the logs that the Shiny app starts and is running (shiny::runApp(/root/dockertest), “Listening on”). But I cannot connect to the app via browser. I tried various ports and canot connect to any of the ports, also not the ones configure via Docker (e.g. 8081).
What am I doing wrong? Is the image not correct? Is the example not suited to be run in a container?
I’m using MacOS 13.2.1 and the latest Docker version.

Looking at

it means you haven’t fixed the shiny port for your application. In the example linked above it is done in the file, but this can also be done in the CMD line of the docker file (or container-cmd in application.yml), e.g.:

CMD ["R", "-e", "shiny::runApp('/root/euler', port=3838, host='')"]

Hi Maxim,
thank you, including the following line works and connects the app to the outside world:

CMD ["R", "-e", "shiny::runApp('/root/dockertest', port=3838, host='')"] 

My original dockerfile actually includes the, so I don’t know what is wrong here. I’m using rocker/r-ver to speed up the build process:

FROM rocker/r-ver:4.2.2
# add the maintainer of this Docker image (this should be you in this case)
LABEL maintainer "xx <my_email>"
# system libraries of general use
RUN apt-get update && apt-get install -y \

sudo \
pandoc \
pandoc-citeproc \
libcurl4-gnutls-dev \
libcairo2-dev \
libxt-dev \
libssl-dev \
libssh2-1-dev \
libssl3 \
&& rm -rf /var/lib/apt/lists/*

RUN R -e "install.packages(c('shiny'))" \
&& strip /usr/local/lib/R/site-library/*/libs/*.so

RUN mkdir /root/dockertest
COPY Testapp /root/dockertest

COPY /usr/lib/R/etc/

# instruct Docker to expose port 3838 to the outside world
# (otherwise it will not be possible to connect to the Shiny application)


# finally, instruct how to launch the Shiny app when the container is started
CMD ["R", "-e", "shiny::runApp('/root/dockertest')"]

The above dockerfile runs successfully, but I cannot connect to the shiny app. Changing the last line to

CMD ["R", "-e", "shiny::runApp('/root/dockertest', port=3838, host='')"]

works. So it seems like the is not included properly?

Indeed, and this is because rocker/r-ver has R in a different location - so you should copy the file to /usr/local/lib/R/etc instead of /usr/lib/R/etc

Thank you. Funny enough, the following does not work as supposed:

COPY /usr/local/lib/R/etc/

I also tried

COPY "${R_HOME}"/etc/

, which did not work either.

My looks like this:

options(shiny.port = 3838, = "")

I don’t know why the app only works when I directly instruct shiny to use port=3838 and host=‘’.