Branding Apache Guacamole Docker Image

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Branding Apache Guacamole Docker Image

Chris Duncan
Hi,

Firstly, let me say that I have been using Apache Guacamole for some time now and find the convenience of the official Docker images really useful. Guacamole has proved particularly useful at work and has become an integral part of our support for remote workers.

For quite a while I have been fiddling with the branding of Apache Guacamole using the guacamole/guacamole Docker image, namely swapping out the logo, favicon and application title text for custom alternatives.
To accomplish this, I have successfully created an extension .jar file and placed it in the $GUACAMOLE_HOME directory. However, I am not satisfied with my solution as it requires some manual manipulation of a running container.

If I use an unaltered version of the start.sh script then I lose my branding after a container restart because the $GUACAMOLE_HOME directory is deleted and recreated in the script. Also, if I use a docker volume bind mount to provide my extension .jar, the container fails to start because when the start.sh script tries to delete $GUACAMOLE_HOME, the extensions directory is in use by the bind mount.

Currently, I have altered the start.sh script by removing the 'rm -Rf $GUACAMOLE_HOME' line and replacing all 'ln -s' commands with 'ln -sf' so that necessary files and directories persist after container restarts. Then I use the 'docker container cp' command to copy my .jar to /root/.guacamole/extensions in the running container. Then I restart the container and my changes are displayed and persist after subsequent restarts.

My plan is to create a new Docker image that contains the altered start.sh script and base my future implementations off of that. Before I take that course of action, I want to be sure that I haven't misunderstood how things are working.

I have read a lot of documentation and I can't seem to find any other resolution for this issue. I'm not sure whether or not I'm doing something wrong or the start.sh script changes that I use should be made in the source.

--
Regards,

Chris
Reply | Threaded
Open this post in threaded view
|

Re: Branding Apache Guacamole Docker Image

Mike Jumper-2
On Sun, May 27, 2018 at 5:59 AM, Chris Duncan <[hidden email]> wrote:

> ...
>
> For quite a while I have been fiddling with the branding of Apache Guacamole
> using the guacamole/guacamole Docker image, namely swapping out the logo,
> favicon and application title text for custom alternatives.
> To accomplish this, I have successfully created an extension .jar file and
> placed it in the $GUACAMOLE_HOME directory. However, I am not satisfied with
> my solution as it requires some manual manipulation of a running container.
>
> If I use an unaltered version of the start.sh script then I lose my branding
> after a container restart because the $GUACAMOLE_HOME directory is deleted
> and recreated in the script. Also, if I use a docker volume bind mount to
> provide my extension .jar, the container fails to start because when the
> start.sh script tries to delete $GUACAMOLE_HOME, the extensions directory is
> in use by the bind mount.
>
> Currently, I have altered the start.sh script by removing the 'rm -Rf
> $GUACAMOLE_HOME' line and replacing all 'ln -s' commands with 'ln -sf' so
> that necessary files and directories persist after container restarts. Then
> I use the 'docker container cp' command to copy my .jar to
> /root/.guacamole/extensions in the running container. Then I restart the
> container and my changes are displayed and persist after subsequent
> restarts.
>

If you have a custom extension which you want to be taken into account
by the Docker image, the prescribed mechanism is:

1) Place that extension within some sensible directory on the server
which will run the Docker container
2) When creating your container, specify that directory as a volume
mount, and point to the mounted location within the image using the
GUACAMOLE_HOME environment variable

The start.sh script will then automatically copy things in place
during startup, and your configuration will persist across restarts.

http://guacamole.apache.org/doc/gug/guacamole-docker.html#guacamole-docker-guacamole-home

- Mike
Reply | Threaded
Open this post in threaded view
|

Re: Branding Apache Guacamole Docker Image

Chris Duncan
Thanks for the clarification. Although I had read the document that you pointed me to, I obviously did something wrong.

I now have a shiny docker-compose.yml file that spins up the Apache Guacamole Docker containers with the appropriate branding.

Just in case anyone else is interested in using Docker Compose in the future, here's my docker-compose.yml example file -




On 27 May 2018 at 19:40, Mike Jumper <[hidden email]> wrote:
On Sun, May 27, 2018 at 5:59 AM, Chris Duncan <[hidden email]> wrote:
> ...
>
> For quite a while I have been fiddling with the branding of Apache Guacamole
> using the guacamole/guacamole Docker image, namely swapping out the logo,
> favicon and application title text for custom alternatives.
> To accomplish this, I have successfully created an extension .jar file and
> placed it in the $GUACAMOLE_HOME directory. However, I am not satisfied with
> my solution as it requires some manual manipulation of a running container.
>
> If I use an unaltered version of the start.sh script then I lose my branding
> after a container restart because the $GUACAMOLE_HOME directory is deleted
> and recreated in the script. Also, if I use a docker volume bind mount to
> provide my extension .jar, the container fails to start because when the
> start.sh script tries to delete $GUACAMOLE_HOME, the extensions directory is
> in use by the bind mount.
>
> Currently, I have altered the start.sh script by removing the 'rm -Rf
> $GUACAMOLE_HOME' line and replacing all 'ln -s' commands with 'ln -sf' so
> that necessary files and directories persist after container restarts. Then
> I use the 'docker container cp' command to copy my .jar to
> /root/.guacamole/extensions in the running container. Then I restart the
> container and my changes are displayed and persist after subsequent
> restarts.
>

If you have a custom extension which you want to be taken into account
by the Docker image, the prescribed mechanism is:

1) Place that extension within some sensible directory on the server
which will run the Docker container
2) When creating your container, specify that directory as a volume
mount, and point to the mounted location within the image using the
GUACAMOLE_HOME environment variable

The start.sh script will then automatically copy things in place
during startup, and your configuration will persist across restarts.

http://guacamole.apache.org/doc/gug/guacamole-docker.html#guacamole-docker-guacamole-home

- Mike



--
Regards,

Chris
Reply | Threaded
Open this post in threaded view
|

Re: Branding Apache Guacamole Docker Image

vnick
On Mon, May 28, 2018 at 3:20 AM, Chris Duncan <[hidden email]> wrote:
Thanks for the clarification. Although I had read the document that you pointed me to, I obviously did something wrong.

I now have a shiny docker-compose.yml file that spins up the Apache Guacamole Docker containers with the appropriate branding.

Just in case anyone else is interested in using Docker Compose in the future, here's my docker-compose.yml example file -




Thanks for sharing that!

-Nick