Hi everyone,
I ran into difficulties with launching openVPN in shinyProxy. I need it for my shinyapp which has to access the database with openVPN connection. So I have 3 docker images: my app, openvpn, and shinyproxy.
- Here is the sample Dockerfile which is used to create an image for **
FROM ubuntu:16.04 RUN apt-get update && \ apt-get clean && apt-get -y update && apt-get install -y locales curl && \ apt-get install -y php apache2 curl openvpn zip unzip bridge-utils && \ apt-get install nano && \ mkdir -p /dev/net && \ mknod /dev/net/tun c 10 200 && \ chmod 600 /dev/net/tun RUN apt-get -y install r- COPY tcp /etc/openvpn EXPOSE 80 CMD openvpn --config /etc/openvpn/user111.ovpn`
- I took a dockerfile for shinyproxy from GitHub - openanalytics/shinyproxy-config-examples: Configuration examples for ShinyProxy
- Here is the application.yml file :
proxy: port: 8080 authentication: simple admin-groups: admins users: - name: jack password: password groups: admins docker: internal-networking: true privileged: true specs: - id: drei display-name: Daily Forecast container-cmd: ["R", "-e", "shiny::runApp('/root/myapp')"] container-image: dreitest container-network: mynet - id: myovpn display-name: VPN container-cmd: ["openvpn" ,"--config", " /etc/openvpn/user111.ovpn"] container-image: ovpn container-network: mynet logging: file: shinyproxy.log
I also tried to run it from R like container-cmd: ["R", "-e", "system('openvpn --config /etc/openvpn/user111.ovpn')"]
, but it didn’t work.
When I run it “mannually” using
docker run -p 80:80 --privileged ovpn openvpn --config /etc/openvpn/user111.ovpn,
it works. When I launch it with shinyProxy, I get an error:
Status code: 500 Message: Container did not respond in time
Please help me to solve this issue.
Best,
Jibek