I am trying to get a Shiny application working as a web server on a Digital Ocean droplet, using a docker image by rocker. All seems to be working fine, but somehow I cannot access the page through a browser.
Docker seems properly exposed to port 80 on the droplet:
R seems to correctly listen to port 80 inside the docker container:
Docker process listing looks correct:
The command by which I started the container is:
docker run -d -p 80:80 --name ggplotgui jelkink/fpr
My Dockerfile looks as follows:
FROM rocker/shiny:latest
COPY . /srv/shiny-server/docker
RUN sudo apt-get install -y libssl-dev xdg-utils
RUN sudo R -e "install.packages(c('shiny', 'dplyr', 'plotly',
'rmarkdown', 'ggplot2', 'readxl', 'haven', 'rio', 'stringr', 'readr',
'devtools'))"
RUN chmod +x /srv/shiny-server/docker/continuous_shiny_run.sh
EXPOSE 80
CMD /srv/shiny-server/docker/continuous_shiny_run.sh
Although, to be honest, I also didn't manage to get it work under my local Docker installation, so perhaps it's unrelated to DigitalOcean.
Running the nginx hello world example on DigitalOcean - same droplet, different docker image - works just fine, including the use of port 80.
My Shiny code explicitly requests port 80:
shinyApp(ui, server, options = list(port = 80))