Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent Data Storage Issue with Ratioghost Docker Container #127

Open
Toshibuck opened this issue Mar 28, 2024 · 2 comments
Open

Persistent Data Storage Issue with Ratioghost Docker Container #127

Toshibuck opened this issue Mar 28, 2024 · 2 comments

Comments

@Toshibuck
Copy link

I'm using your baseimage Docker to containerize the Ratioghost application. I can access the Ratioghost interface through the browser without any issue. However, the application saves its settings in a file which gets deleted every time the Docker is restarted because it's stored in the directory /app/ratioghost-master/. How can I work around this problem? Should I create a symbolic link between the /app and /config directories to make the data persistent?

Voici le dockerfile :

FROM jlesage/baseimage-gui:alpine-3.15-v4

# Installer tcl-tls et tk (Tk est n\u00e9cessaire pour 'wish')
RUN add-pkg tcl-tls tk ttf-dejavu

# T\u00e9l\u00e9charger et extraire ratioghost
RUN wget -O /tmp/ratioghost.zip https://github.com/ratioghost/ratioghost/archive/refs/heads/master.zip && \
    unzip /tmp/ratioghost.zip -d /app/ && \
    rm /tmp/ratioghost.zip

# Copier le script de d\u00e9marrage.
COPY startapp.sh /startapp.sh

# D\u00e9finir le nom de l'application.
RUN set-cont-env APP_NAME "Ratioghost"

Et le start.sh:

#!/bin/sh
# Définir le chemin des bibliothèques Tcl/Tk
#export LD_LIBRARY_PATH=/usr/lib
# Changer le répertoire de travail vers le dossier rghost.vfs
cd /app/ratioghost-master/
# Exécuter le script Tcl
exec wish rghost.vfs/main.tcl

I want to emphasize that I'm a complete beginner in creating Docker images, and I'm likely approaching it quite clumsily.

Thank you, Toshibuck.

@jlesage
Copy link
Owner

jlesage commented Mar 28, 2024

If there is no way for the app to use /config instead, then yes the other approach is to create (from Dockerfile) a symlink at /app that points to /config.

@Toshibuck
Copy link
Author

Hello,

I changed the path to /config in both the Dockerfile and startapp.sh, but I encountered an error stating that there was nothing in the directory during docker run. It's possible that the /config directory is created once the image is loaded. Consequently, I placed the application in /config on the volume side, and it worked. It's not an ideal solution, but it suits my needs.

However, the application requires a port. Do I need to specify a port somewhere? Considering that I'm routing this Docker through Gluetun, and I've properly opened the port in Gluetun, and there is indeed a VPN IP within the Docker I've created.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants