Thank you Mark. I apologize for the format of the docker-compose all being 
scrambled in my previous email, I've attached it in a file hopefully it's more 
readable.

So if I understand you correctly, in order for my container to be able to 
inherit the contents of the host's /opt/guacamole-home directory, I should have 
a volume. So if I take those lines out where the volume gets referenced, and 
just define the environment variable, it won't work. Did I understand you 
correctly?
Thank you
    On Monday, July 16, 2018, 2:15:12 PM EDT, Mark Nolan <[email protected]> 
wrote:  
 
 I am not a docker compose user and I'm finding your yaml very hard to read
in the email, but simply put, the behaviour of the docker container is:

- If GUACAMOLE_HOME is set when the container starts, then treat that
folder as the start of the real guacamole home, copying the contents
across. Add to it any requirements from other options (e.g. install the
mysql extension and add mysql parameters to any existing
guacamole.properties).
- If GUACAMOLE_HOME is not set, then just create a guacamole home from
scratch copying in any required extensions.

If your template guacamole home directory is on the docker host, then it
must be exposed to the container as a volume, otherwise the corresponding
folder inside the container will not exist or will be empty and nothing
will be copied across.

Is that clear? Does it answer your question?

Regards,
Mark.
.



On 16 July 2018 at 12:17, Tezarin <[email protected]> wrote:

> Hi all,
> I have Guacamole running inside the docker containers (guacd and
> guacamole),  I'm trying to add a new environment variable to my Guacamole
> docker-compose file to set the Guacamole home to /opt/guacamole-home.
> On the docker host machine I have created the /opt/guacamole-home
> directory and have several files in there. In my docker compose file I have
> these lines added:
>  guacamole:    build: .    image: Myimage/guacamole    volumes:      -
> guacamole-home:/opt/guacamole-home    restart: always..environment:-
> GUACAMOLE_HOME=/opt/guacamole-home...volumes:  guacamole-home:
> My Dockerfile's base image is FROM guacamole/guacamole
> I understand the base image (guacamole/guacamole) does not have the
> guacamole-home defined. So I took the  volume lines out of my
> docker-compose out so it looks like this:
> guacamole:    build: .    image: Myimage/guacamole    restart: always...
> But now, those files I  have  in the  host machine's  /opt/guacamole-home
> do no get copied to the container with t his  error;
> cp: cannot stat '/opt/guacamole-home/.': No such file or directory
>
> The upstream image does not have the guacamole-home defined.  If  I want
> the content of the host machine's /opt/guacamole-home to  get copied to the
> /opt/-guacamole-home inside the Guacamole docker container, will I have  to
> add those volume lines back  in?
> Thanks
>
  

Reply via email to