Thanks for your answer.
I've read the documentation one and again and there's something I cannot
understand or something doesn't run fine.
Let's see:
- My docker volume with my custom settings is:
docker volume inspect guacamole-home
[
{
"CreatedAt": "2023-10-30T23:22:29+01:00",
"Driver": "local",
"Labels": null,
"Mountpoint": "/var/lib/docker/volumes/guacamole-home/_data",
"Name": "guacamole-home",
"Options": null,
"Scope": "local"
}
]
- The contents of my custom .guacamole directory are:
ls -p1 /var/lib/docker/volumes/guacamole-home/_data/.guacamole
extensions/
guacamole.properties
lib/
user-mapping.xml
user-mapping.xml.EXAMPLE
- The docker are executed:
docker run --name mymachine-guacamole --restart unless-stopped --link
mymachine-guacd:guacd -e GUACAMOLE_HOME=/etc/guacamole -v
guacamole-home:/etc/guacamole -d -p 8080:8080 guacamole/guacamole:latest
- List the contents of the directories from the container:
docker exec -it mymachine-guacamole ls -l /etc/guacamole/.guacamole/
total 20
drwxr-xr-x 2 guacamole guacamole 4096 Oct 30 22:30 extensions
-rw-r--r-- 1 guacamole guacamole 111 Oct 30 23:00 guacamole.properties
drwxr-xr-x 2 guacamole guacamole 4096 Oct 30 22:30 lib
-rw-r--r-- 1 guacamole guacamole 497 Oct 31 16:49 user-mapping.xml
-rw-r--r-- 1 guacamole guacamole 1189 Oct 30 22:30 user-mapping.xml.EXAMPLE
docker exec -it mymachine-guacamole ls -l /home/guacamole/.guacamole/
total 12
drwxr-xr-x 2 guacamole guacamole 4096 Nov 1 17:40 extensions
-rw-r--r-- 1 guacamole guacamole 111 Nov 1 17:40 guacamole.properties
drwxr-xr-x 2 guacamole guacamole 4096 Nov 1 17:40 lib
- Show the env GUACAMOLE_HOME inside the container:
docker exec -it mymachine-guacamole bash -c 'echo $GUACAMOLE_HOME'
/etc/guacamole
I don't know what I'm doing bad.
Thanks again.
----
El 1/11/23 a las 18:09, Michael Jumper escribió:
On 11/1/2023 7:43 AM, Víctor J. Sánchez wrote:
Hi all,
I'm using Apache Guacamole 1.5.3 with a docker container. I need to
change several settings as user-mapping.xml, guacamole.properties or
include new extensions i.e. change my custom GUACAMOLE_HOME and keep
it accross docker restarts.
The command I use to start Guacamole in docker is:
docker run --name mymachine-guacamole --restart unless-stopped --link
mymachine-guacd:guacd -e GUACAMOLE_HOME=/etc/guacamole -v
guacamole-home:/etc/guacamole -d -p 8080:8080 guacamole/guacamole:latest
Firstly I created the docker volume guacamole-home with my persistent
Guacamole settings.
When I watch the docker logs I see between other lines:
...
11:37:54.419 [localhost-startStop-1] INFO
o.a.g.environment.LocalEnvironment - GUACAMOLE_HOME is
"/home/guacamole/.guacamole".
11:37:54.523 [localhost-startStop-1] INFO
o.a.g.GuacamoleServletContextListener - Read configuration parameters
from "/home/guacamole/.guacamole/guacamole.properties".
...
So I don't know why GUACAMOLE_HOME isn't changed before Tomcat starts
or the start.sh script doesn't take into account. Moreover the
start.sh script always cleans GUACAMOLE_HOME at start.
The "guacamole/guacamole" Docker image uses the "GUACAMOLE_HOME"
environment variable to define a template that is used for the actual
GUACAMOLE_HOME seen by the webapp, which in the image is always
"~/.guacamole" of the Tomcat service.
If specified, the contents of "GUACAMOLE_HOME" are copied over to
"~/.guacamole" and used as the basis for the rest of the
configuration, which is generated from environment variables.
See:
https://guacamole.apache.org/doc/gug/guacamole-docker.html#custom-extensions-and-guacamole-home
Your changes will persist across restarts since the true configuration
directory is entirely regenerated from the template you provide each
time the image starts. If your template is consistent, so will be the
configuration of the container. If your template changes, those
changes will take effect after next restart.
- Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]