mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1418: Add support of SQL Server JDBC plugin in Docker Image
This commit is contained in:
@@ -13,7 +13,7 @@ How to use this image
|
||||
|
||||
Using this image will require an existing, running Docker container with the
|
||||
[guacd image](https://registry.hub.docker.com/u/guacamole/guacd/), and another
|
||||
Docker container providing either a PostgreSQL or MySQL database.
|
||||
Docker container providing either a PostgreSQL, MySQL or SQLServer database.
|
||||
|
||||
The name of the database and all associated credentials are specified with
|
||||
environment variables given when the container is created. All other
|
||||
@@ -31,9 +31,9 @@ Docker, as well.
|
||||
Docker Secrets
|
||||
==============
|
||||
The string `_FILE` may be appended to some of the environment variables listed
|
||||
below if you are using MySQL or PostgreSQL authentication. This will cause the
|
||||
startup script to load the values for those variables from files within
|
||||
the container.
|
||||
below if you are using MySQL, PostgreSQL or SQLServer authentication. This will
|
||||
cause the startup script to load the values for those variables from files
|
||||
within the container.
|
||||
|
||||
This is useful for specifying sensitive info, ie. passwords for
|
||||
the database, in secured files instead of plaintext environment variables. This
|
||||
@@ -163,6 +163,63 @@ The process for doing this via the `mysql` utility included with MySQL is
|
||||
documented in
|
||||
[the Guacamole manual](http://guacamole.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-mysql).
|
||||
|
||||
Deploying Guacamole with SQLServer authentication
|
||||
--------------------------------------------------
|
||||
|
||||
docker run --name some-guacamole --link some-guacd:guacd \
|
||||
--link some-sqlserver:sqlserver \
|
||||
-e SQLSERVER_DATABASE=guacamole_db \
|
||||
-e SQLSERVER_USER=guacamole_user \
|
||||
-e SQLSERVER_PASSWORD=some_password \
|
||||
-e SQLSERVER_DATABASE_FILE=/run/secrets/<secret_name> \
|
||||
-e SQLSERVER_USER_FILE=/run/secrets/<secret_name> \
|
||||
-e SQLSERVER_PASSWORD_FILE=/run/secrets/<secret_name> \
|
||||
-d -p 8080:8080 guacamole/guacamole
|
||||
|
||||
Linking Guacamole to SQLServer requires three environment variables. If any of
|
||||
these environment variables are omitted, you will receive an error message, and
|
||||
the image will stop:
|
||||
|
||||
1. `SQLSERVER_DATABASE` - The name of the database to use for Guacamole
|
||||
authentication.
|
||||
2. `SQLSERVER_USER` - The user that Guacamole will use to connect to SQLServer.
|
||||
3. `SQLSERVER_PASSWORD` - The password that Guacamole will provide when
|
||||
connecting to SQLServer as `SQLSERVER_USER`.
|
||||
4. `SQLSERVER_DATABASE_FILE` - The path of the docker secret containing the name
|
||||
of database to use for Guacamole authentication.
|
||||
5. `SQLSERVER_USER_FILE` - The path of the docker secret containing the name of
|
||||
the user that Guacamole will use to connect to SQLServer.
|
||||
6. `SQLSERVER_PASSWORD_FILE` - The path of the docker secret containing the
|
||||
password that Guacamole will provide when connecting to SQLServer as
|
||||
`SQLSERVER_USER.
|
||||
|
||||
### Initializing the SQLServer database
|
||||
|
||||
If your database is not already initialized with the Guacamole schema, you will
|
||||
need to do so prior to using Guacamole. A convenience script for generating the
|
||||
necessary SQL to do this is included in the Guacamole image.
|
||||
|
||||
To generate a SQL script which can be used to initialize a fresh SQLServer
|
||||
database
|
||||
[as documented in the Guacamole manual](http://guacamole.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-sqlserver):
|
||||
|
||||
docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --sqlserver > initdb.sql
|
||||
|
||||
Alternatively, you can use the SQL scripts included with the
|
||||
guacamole-auth-jdbc extension from
|
||||
[the corresponding release](http://guacamole.apache.org/releases/).
|
||||
|
||||
Once this script is generated, you must:
|
||||
|
||||
1. Create a database for Guacamole within SQLServer, such as `guacamole_db`.
|
||||
2. Run the script on the newly-created database.
|
||||
3. Create a user for Guacamole within SQLServer with access to the tables and
|
||||
sequences of this database, such as `guacamole_user`.
|
||||
|
||||
The process for doing this via the `sqlcmd` utilities included
|
||||
with SQLServer is documented in
|
||||
[the Guacamole manual](http://guacamole.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-sqlserver).
|
||||
|
||||
Reporting issues
|
||||
================
|
||||
|
||||
|
Reference in New Issue
Block a user