Skip to content

Issues with ShinyProxy 3.1.1 Docker Image on Docker Swarm Backend #46

@ziyunxiao

Description

@ziyunxiao

Description:

I discovered two issues with the ShinyProxy 3.1.1 Docker image on a Docker Swarm backend.

Issue 1: Port Access Error

During startup, some processes attempt to open port 80 on localhost but encounter a permission error due to running as a non-root user (shinyproxy). This is because the normal user cannot open ports <1024. A temporary workaround is to build a custom image that runs as root. However, a proper fix is required for security reasons.

Issue 2: Redis Connection Error

After bypassing the port access error, I encountered a connection error to Redis due to authentication failure. Despite providing the correct password, the same configuration works correctly on Kubernetes. This suggests that the issue is specific to Docker Swarm.

The workaround is to remove setting of store-mode: redis

Steps to Reproduce:

  1. Follow standard deployment procedures for ShinyProxy 3.1.1.
  2. Set container-backend: docker-swarm
  3. Set backend & Redis
spring:
  application:
    name: Data Science Applications
  session:
    store-type: redis
  redis:
    host: redis-service
    password: xxxxxxxxxx
proxy:
  container-backend: docker-swarm
  store-mode: redis
  # ... other settings
  1. startup Shinyproxy and watch the shinyproxy service logs

example of docker-compose.yml

services:
  shiny:
    image: openanalytics/shinyproxy:3.1.1
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./conf/example.yml:/opt/shinyproxy/application.yml
    networks:
      - shiny-net

Best Regards,

Robin

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions