I dockerized shinyproxy, initially with two basic apps. However, from the main page, both links open the same app (whichever one was first opened). This ran as expected when not dockerized, so maybe there’s something wrong with my network settings? Here is the application.yml file:
proxy:
title: xx
logo-url: file:///usr/local/shinyproxy/logo.png
landing-page: /
heartbeat-rate: 10000
heartbeat-timeout: 60000
port: 8080
authentication: simple
admin-groups: developers
shiny.proxy.docker.internal-networking: true
# 'simple' authentication configuration
users:
- name: user
password: password
groups: developers
# Docker configuration
docker:
internal-networking: true
specs:
- id: test1
display-name: test1
description: test1
container-cmd: ["R", "-e", "shiny::runApp('/apps/app1')"]
container-image: cmhh/shinyapps
access-groups: [developers, testers]
container-network: host
- id: test2
display-name: test2
description: test2
container-cmd: ["R", "-e", "shiny::runApp('/apps/app2')"]
container-image: cmhh/shinyapps
access-groups: [developers, testers]
container-network: host
logging:
file:
shinyproxy.log
This was managed from docker-compose, with the shinyproxy section looking as follows:
version: '3'
services:
shinyproxy:
image: "cmhh/shinyproxy"
container_name: shinyproxy
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
network_mode: "host"
ports:
- 8080:8080
Here is the Dockerfile for my shinyproxy container:
FROM openjdk:8-jre
RUN apt-get update && apt-get install -y --no-install-recommends\
openjdk-8-jre
RUN mkdir /usr/local/shinyproxy
RUN wget https://www.shinyproxy.io/downloads/shinyproxy-2.0.1.jar -O /usr/local/shinyproxy/shinyproxy.jar
COPY application.yml /usr/local/shinyproxy/
COPY logo.png /usr/local/shinyproxy/
EXPOSE 8080
WORKDIR /usr/local/shinyproxy/
CMD ["java", "-jar", "/usr/local/shinyproxy/shinyproxy.jar"]
Cheers
Chris