After a question on the mailing list recently I decided to try to write an
extension that starts a Docker container upon login and sets up a
connection to the container automatically.  I decided to use the
docker-java client:

https://github.com/docker-java/docker-java

I've run into an interesting issue with this.  If I include the dependency
normally - without specifying a scope - it pulls in between 15 and 20 MB
(!) of dependencies - the overall size of the target file is between 18 and
20 MB.  Interestingly Guacamole fails to load this extension with an error
that the Authentication Provider class cannot be found.  It's almost as if
there is a size limitation, either overall file size in bytes, or number of
entries within the JAR, that the load chokes on.  I cannot find anywhere in
the Guacamole code where this is specified, so I'm not sure where the
limitation is, or if that's really the issue, but it seems that way.

I decided to try to specify the docker-java dependency as "provided" and
then build docker-java JAR file and put it in the Java classpath.  This
works okay for the docker-java piece, but building that JAR doesn't
generate all of the dependencies for the Docker client (e.g. Google Guava
is missing from the resulting JAR), so I get errors about missing classes.

Any ideas the best way to proceed with this, either any insight on the
limitation for the file size for a Guacamole extension, or how to correctly
generate a JAR for the Docker client that could be placed into a lib
directory (similar to a JDBC driver) that would contain the correct
dependencies?

I could use a different Docker Java client - Spotify seems to have one
available that I haven't tried, yet - but I've gotten used to the API on
this one and would rather not redo it for another client.

Thanks,
Nick

Reply via email to