Merge docker image addition.

This commit is contained in:
James Muehlner
2016-05-20 15:37:04 -07:00
10 changed files with 891 additions and 12 deletions

View File

@@ -0,0 +1,3 @@
*~
.git
.gitignore

1
guacamole-docker/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*~

View File

@@ -0,0 +1,46 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#
# Dockerfile for guacamole-client
#
# Start from Tomcat image
FROM tomcat:8.0.20-jre7
MAINTAINER Michael Jumper <mike.jumper@guac-dev.org>
# Version info
ENV \
GUAC_VERSION=0.9.9 \
GUAC_JDBC_VERSION=0.9.9 \
GUAC_LDAP_VERSION=0.9.9
# Add configuration scripts
COPY bin /opt/guacamole/bin/
# Download and install latest guacamole-client and authentication
RUN \
/opt/guacamole/bin/download-guacamole.sh "$GUAC_VERSION" /usr/local/tomcat/webapps && \
/opt/guacamole/bin/download-jdbc-auth.sh "$GUAC_JDBC_VERSION" /opt/guacamole && \
/opt/guacamole/bin/download-ldap-auth.sh "$GUAC_LDAP_VERSION" /opt/guacamole
# Start Guacamole under Tomcat, listening on 0.0.0.0:8080
EXPOSE 8080
CMD ["/opt/guacamole/bin/start.sh" ]

123
guacamole-docker/README.md Normal file
View File

@@ -0,0 +1,123 @@
What is Apache Guacamole?
=========================
[Apache Guacamole](http://guacamole.incubator.apache.org/) is a clientless
remote desktop gateway. It supports standard protocols like VNC and RDP. We
call it clientless because no plugins or client software are required.
Thanks to HTML5, once Guacamole is installed on a server, all you need to
access your desktops is a web browser.
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/glyptodon/guacd/), and another
Docker container providing either a PostgreSQL or MySQL database.
The name of the database and all associated credentials are specified with
environment variables given when the container is created. All other
configuration information is generated from the Docker links.
Beware that you will need to initialize the database manually. Guacamole will
not automatically create its own tables, but SQL scripts are provided to do
this.
Once the Guacamole image is running, Guacamole will be accessible at
`http://[address of container]:8080/guacamole/`. The instructions below use the
`-p 8080:8080` option to expose this port at the level of the machine hosting
Docker, as well.
Deploying Guacamole with PostgreSQL authentication
--------------------------------------------------
docker run --name some-guacamole --link some-guacd:guacd \
--link some-postgres:postgres \
-e POSTGRES_DATABASE=guacamole_db \
-e POSTGRES_USER=guacamole_user \
-e POSTGRES_PASSWORD=some_password \
-d -p 8080:8080 glyptodon/guacamole
Linking Guacamole to PostgreSQL requires three environment variables. If any of
these environment variables are omitted, you will receive an error message, and
the image will stop:
1. `POSTGRES_DATABASE` - The name of the database to use for Guacamole authentication.
2. `POSTGRES_USER` - The user that Guacamole will use to connect to PostgreSQL.
3. `POSTGRES_PASSWORD` - The password that Guacamole will provide when connecting to PostgreSQL as `POSTGRES_USER`.
### Initializing the PostgreSQL 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 PostgreSQL
database
[as documented in the Guacamole manual](http://guacamole.incubator.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-postgresql):
docker run --rm glyptodon/guacamole /opt/guacamole/bin/initdb.sh --postgres > initdb.sql
Alternatively, you can use the SQL scripts included with
[guacamole-auth-jdbc](http://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-jdbc-0.9.6.tar.gz/download).
Once this script is generated, you must:
1. Create a database for Guacamole within PostgreSQL, such as `guacamole_db`.
2. Run the script on the newly-created database.
3. Create a user for Guacamole within PostgreSQL with access to the tables and
sequences of this database, such as `guacamole_user`.
The process for doing this via the `psql` and `createdb` utilities included
with PostgreSQL is documented in
[the Guacamole manual](http://guacamole.incubator.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-postgresql).
Deploying Guacamole with MySQL authentication
--------------------------------------------------
docker run --name some-guacamole --link some-guacd:guacd \
--link some-mysql:mysql \
-e MYSQL_DATABASE=guacamole_db \
-e MYSQL_USER=guacamole_user \
-e MYSQL_PASSWORD=some_password \
-d -p 8080:8080 glyptodon/guacamole
Linking Guacamole to MySQL requires three environment variables. If any of
these environment variables are omitted, you will receive an error message, and
the image will stop:
1. `MYSQL_DATABASE` - The name of the database to use for Guacamole authentication.
2. `MYSQL_USER` - The user that Guacamole will use to connect to MySQL.
3. `MYSQL_PASSWORD` - The password that Guacamole will provide when connecting to MySQL as `MYSQL_USER`.
### Initializing the MySQL 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 MySQL database
[as documented in the Guacamole manual](http://guacamole.incubator.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-mysql):
docker run --rm glyptodon/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql
Alternatively, you can use the SQL scripts included with
[guacamole-auth-jdbc](http://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-jdbc-0.9.6.tar.gz/download).
Once this script is generated, you must:
1. Create a database for Guacamole within MySQL, such as `guacamole_db`.
2. Create a user for Guacamole within MySQL with access to this database, such
as `guacamole_user`.
3. Run the script on the newly-created database.
The process for doing this via the `mysql` utility included with MySQL is
documented in
[the Guacamole manual](http://guacamole.incubator.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-mysql).
Reporting issues
================
Please report any bugs encountered by opening a new issue in
[our JIRA](https://issues.apache.org/jira/browse/GUACAMOLE/).

View File

@@ -0,0 +1,49 @@
#!/bin/sh -e
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
##
## @fn download-guacamole.sh
##
## Downloads Guacamole, saving the specified version to "guacamole.war" within
## the given directory.
##
## @param VERSION
## The version of guacamole.war to download, such as "0.9.6".
##
## @param DESTINATION
## The directory to save guacamole.war within.
##
VERSION="$1"
DESTINATION="$2"
#
# Create destination, if it does not yet exist
#
mkdir -p "$DESTINATION"
#
# Download guacamole.war, placing in specified destination
#
echo "Downloading Guacamole version $VERSION to $DESTINATION ..."
curl -L "http://sourceforge.net/projects/guacamole/files/current/binary/guacamole-${VERSION}.war" > "$DESTINATION/guacamole.war"

View File

@@ -0,0 +1,83 @@
#!/bin/sh -e
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
##
## @fn download-jdbc-auth.sh
##
## Downloads JDBC authentication support, including any required JDBC drivers.
## The downloaded files will be grouped by their associated database type, with
## all MySQL files being placed within the "mysql/" subdirectory of the
## destination, and all PostgreSQL files being placed within the "postgresql/"
## subdirectory of the destination.
##
## @param VERSION
## The version of guacamole-auth-jdbc to download, such as "0.9.6".
##
## @param DESTINATION
## The directory to save downloaded files within. Note that this script
## will create database-specific subdirectories within this directory,
## and downloaded files will be thus grouped by their respected database
## types.
##
VERSION="$1"
DESTINATION="$2"
#
# Create destination, if it does not yet exist
#
mkdir -p "$DESTINATION"
#
# Download Guacamole JDBC auth
#
echo "Downloading JDBC auth version $VERSION ..."
curl -L "http://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-jdbc-$VERSION.tar.gz" | \
tar -xz \
-C "$DESTINATION" \
--wildcards \
--no-anchored \
--strip-components=1 \
"*.jar" \
"*.sql"
#
# Download MySQL JDBC driver
#
echo "Downloading MySQL Connector/J ..."
curl -L "http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.35.tar.gz" | \
tar -xz \
-C "$DESTINATION/mysql/" \
--wildcards \
--no-anchored \
--no-wildcards-match-slash \
--strip-components=1 \
"mysql-connector-*.jar"
#
# Download PostgreSQL JDBC driver
#
echo "Downloading PostgreSQL JDBC driver ..."
curl -L "https://jdbc.postgresql.org/download/postgresql-9.4-1201.jdbc41.jar" > "$DESTINATION/postgresql/postgresql-9.4-1201.jdbc41.jar"

View File

@@ -0,0 +1,62 @@
#!/bin/sh -e
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
##
## @fn download-ldap-auth.sh
##
## Downloads LDAP authentication support. The LDAP authentication .jar file
## will be placed within the specified destination directory.
##
## @param VERSION
## The version of guacamole-auth-ldap to download, such as "0.9.6".
##
## @param DESTINATION
## The directory to save downloaded files within.
##
VERSION="$1"
DESTINATION="$2"
#
# Use ldap/ subdirectory within DESTINATION.
#
DESTINATION="$DESTINATION/ldap"
#
# Create destination, if it does not yet exist
#
mkdir -p "$DESTINATION"
#
# Download Guacamole LDAP auth
#
echo "Downloading LDAP auth version $VERSION ..."
curl -L "http://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-ldap-$VERSION.tar.gz" | \
tar -xz \
-C "$DESTINATION" \
--wildcards \
--no-anchored \
--xform="s#.*/##" \
"*.jar" \
"*.ldif"

69
guacamole-docker/bin/initdb.sh Executable file
View File

@@ -0,0 +1,69 @@
#!/bin/sh -e
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
##
## @fn initdb.sh
##
## Generates a database initialization SQL script for a database of the given
## type. The SQL will be sent to STDOUT.
##
## @param DATABASE
## The database to generate the SQL script for. This may be either
## "--postgres", for PostgreSQL, or "--mysql" for MySQL.
##
DATABASE="$1"
##
## Prints usage information for this shell script and exits with an error code.
## Calling this function will immediately terminate execution of the script.
##
incorrect_usage() {
cat <<END
USAGE: /opt/guacamole/bin/initdb.sh [--postgres | --mysql]
END
exit 1
}
# Validate parameters
if [ "$#" -ne 1 ]; then
echo "Wrong number of arguments."
incorrect_usage
fi
#
# Produce script
#
case $DATABASE in
--postgres)
cat /opt/guacamole/postgresql/schema/*.sql
;;
--mysql)
cat /opt/guacamole/mysql/schema/*.sql
;;
*)
echo "Bad database type: $DATABASE"
incorrect_usage
esac

410
guacamole-docker/bin/start.sh Executable file
View File

@@ -0,0 +1,410 @@
#!/bin/sh -e
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
##
## @fn start.sh
##
## Automatically configures and starts Guacamole under Tomcat. Guacamole's
## guacamole.properties file will be automatically generated based on the
## linked database container (either MySQL or PostgreSQL) and the linked guacd
## container. The Tomcat process will ultimately replace the process of this
## script, running in the foreground until terminated.
##
GUACAMOLE_HOME="$HOME/.guacamole"
GUACAMOLE_EXT="$GUACAMOLE_HOME/extensions"
GUACAMOLE_LIB="$GUACAMOLE_HOME/lib"
GUACAMOLE_PROPERTIES="$GUACAMOLE_HOME/guacamole.properties"
##
## Sets the given property to the given value within guacamole.properties,
## creating guacamole.properties first if necessary.
##
## @param NAME
## The name of the property to set.
##
## @param VALUE
## The value to set the property to.
##
set_property() {
NAME="$1"
VALUE="$2"
# Ensure guacamole.properties exists
if [ ! -e "$GUACAMOLE_PROPERTIES" ]; then
mkdir -p "$GUACAMOLE_HOME"
echo "# guacamole.properties - generated `date`" > "$GUACAMOLE_PROPERTIES"
fi
# Set property
echo "$NAME: $VALUE" >> "$GUACAMOLE_PROPERTIES"
}
##
## Sets the given property to the given value within guacamole.properties only
## if a value is provided, creating guacamole.properties first if necessary.
##
## @param NAME
## The name of the property to set.
##
## @param VALUE
## The value to set the property to, if any. If omitted or empty, the
## property will not be set.
##
set_optional_property() {
NAME="$1"
VALUE="$2"
# Set the property only if a value is provided
if [ -n "$VALUE" ]; then
set_property "$NAME" "$VALUE"
fi
}
##
## Adds properties to guacamole.properties which select the MySQL
## authentication provider, and configure it to connect to the linked MySQL
## container. If a MySQL database is explicitly specified using the
## MYSQL_HOSTNAME and MYSQL_PORT environment variables, that will be used
## instead of a linked container.
##
associate_mysql() {
# Use linked container if specified
if [ -n "$MYSQL_NAME" ]; then
MYSQL_HOSTNAME="$MYSQL_PORT_3306_TCP_ADDR"
MYSQL_PORT="$MYSQL_PORT_3306_TCP_PORT"
fi
# Use default port if none specified
MYSQL_PORT="${MYSQL_PORT-3306}"
# Verify required connection information is present
if [ -z "$MYSQL_HOSTNAME" -o -z "$MYSQL_PORT" ]; then
cat <<END
FATAL: Missing MYSQL_HOSTNAME or "mysql" link.
-------------------------------------------------------------------------------
If using a MySQL database, you must either:
(a) Explicitly link that container with the link named "mysql".
(b) If not using a Docker container for MySQL, explicitly specify the TCP
connection to your database using the following environment variables:
MYSQL_HOSTNAME The hostname or IP address of the MySQL server. If not
using a MySQL Docker container and corresponding link,
this environment variable is *REQUIRED*.
MYSQL_PORT The port on which the MySQL server is listening for TCP
connections. This environment variable is option. If
omitted, the standard MySQL port of 3306 will be used.
END
exit 1;
fi
# Verify required parameters are present
if [ -z "$MYSQL_USER" -o -z "$MYSQL_PASSWORD" -o -z "$MYSQL_DATABASE" ]; then
cat <<END
FATAL: Missing required environment variables
-------------------------------------------------------------------------------
If using a MySQL database, you must provide each of the following
environment variables:
MYSQL_USER The user to authenticate as when connecting to
MySQL.
MYSQL_PASSWORD The password to use when authenticating with MySQL as
MYSQL_USER.
MYSQL_DATABASE The name of the MySQL database to use for Guacamole
authentication.
END
exit 1;
fi
# Update config file
set_property "mysql-hostname" "$MYSQL_HOSTNAME"
set_property "mysql-port" "$MYSQL_PORT"
set_property "mysql-database" "$MYSQL_DATABASE"
set_property "mysql-username" "$MYSQL_USER"
set_property "mysql-password" "$MYSQL_PASSWORD"
set_optional_property \
"mysql-absolute-max-connections" \
"$MYSQL_ABSOLUTE_MAX_CONNECTIONS"
set_optional_property \
"mysql-default-max-connections" \
"$MYSQL_DEFAULT_MAX_CONNECTIONS"
set_optional_property \
"mysql-default-max-group-connections" \
"$MYSQL_DEFAULT_MAX_GROUP_CONNECTIONS"
set_optional_property \
"mysql-default-max-connections-per-user" \
"$MYSQL_DEFAULT_MAX_CONNECTIONS_PER_USER"
set_optional_property \
"mysql-default-max-group-connections-per-user" \
"$MYSQL_DEFAULT_MAX_GROUP_CONNECTIONS_PER_USER"
# Add required .jar files to GUACAMOLE_LIB and GUACAMOLE_EXT
ln -s /opt/guacamole/mysql/mysql-connector-*.jar "$GUACAMOLE_LIB"
ln -s /opt/guacamole/mysql/guacamole-auth-*.jar "$GUACAMOLE_EXT"
}
##
## Adds properties to guacamole.properties which select the PostgreSQL
## authentication provider, and configure it to connect to the linked
## PostgreSQL container. If a PostgreSQL database is explicitly specified using
## the POSTGRES_HOSTNAME and POSTGRES_PORT environment variables, that will be
## used instead of a linked container.
##
associate_postgresql() {
# Use linked container if specified
if [ -n "$POSTGRES_NAME" ]; then
POSTGRES_HOSTNAME="$POSTGRES_PORT_5432_TCP_ADDR"
POSTGRES_PORT="$POSTGRES_PORT_5432_TCP_PORT"
fi
# Use default port if none specified
POSTGRES_PORT="${POSTGRES_PORT-5432}"
# Verify required connection information is present
if [ -z "$POSTGRES_HOSTNAME" -o -z "$POSTGRES_PORT" ]; then
cat <<END
FATAL: Missing POSTGRES_HOSTNAME or "postgres" link.
-------------------------------------------------------------------------------
If using a PostgreSQL database, you must either:
(a) Explicitly link that container with the link named "postgres".
(b) If not using a Docker container for PostgreSQL, explicitly specify the TCP
connection to your database using the following environment variables:
POSTGRES_HOSTNAME The hostname or IP address of the PostgreSQL server. If
not using a PostgreSQL Docker container and
corresponding link, this environment variable is
*REQUIRED*.
POSTGRES_PORT The port on which the PostgreSQL server is listening for
TCP connections. This environment variable is option. If
omitted, the standard PostgreSQL port of 5432 will be
used.
END
exit 1;
fi
# Verify required parameters are present
if [ -z "$POSTGRES_USER" -o -z "$POSTGRES_PASSWORD" -o -z "$POSTGRES_DATABASE" ]; then
cat <<END
FATAL: Missing required environment variables
-------------------------------------------------------------------------------
If using a PostgreSQL database, you must provide each of the following
environment variables:
POSTGRES_USER The user to authenticate as when connecting to
PostgreSQL.
POSTGRES_PASSWORD The password to use when authenticating with PostgreSQL
as POSTGRES_USER.
POSTGRES_DATABASE The name of the PostgreSQL database to use for Guacamole
authentication.
END
exit 1;
fi
# Update config file
set_property "postgresql-hostname" "$POSTGRES_HOSTNAME"
set_property "postgresql-port" "$POSTGRES_PORT"
set_property "postgresql-database" "$POSTGRES_DATABASE"
set_property "postgresql-username" "$POSTGRES_USER"
set_property "postgresql-password" "$POSTGRES_PASSWORD"
set_optional_property \
"postgresql-absolute-max-connections" \
"$POSTGRES_ABSOLUTE_MAX_CONNECTIONS"
set_optional_property \
"postgresql-default-max-connections" \
"$POSTGRES_DEFAULT_MAX_CONNECTIONS"
set_optional_property \
"postgresql-default-max-group-connections" \
"$POSTGRES_DEFAULT_MAX_GROUP_CONNECTIONS"
set_optional_property \
"postgresql-default-max-connections-per-user" \
"$POSTGRES_DEFAULT_MAX_CONNECTIONS_PER_USER"
set_optional_property \
"postgresql-default-max-group-connections-per-user" \
"$POSTGRES_DEFAULT_MAX_GROUP_CONNECTIONS_PER_USER"
# Add required .jar files to GUACAMOLE_LIB and GUACAMOLE_EXT
ln -s /opt/guacamole/postgresql/postgresql-*.jar "$GUACAMOLE_LIB"
ln -s /opt/guacamole/postgresql/guacamole-auth-*.jar "$GUACAMOLE_EXT"
}
##
## Adds properties to guacamole.properties which select the LDAP
## authentication provider, and configure it to connect to the specified LDAP
## directory.
##
associate_ldap() {
# Verify required parameters are present
if [ -z "$LDAP_HOSTNAME" -o -z "$LDAP_USER_BASE_DN" ]; then
cat <<END
FATAL: Missing required environment variables
-------------------------------------------------------------------------------
If using an LDAP directory, you must provide each of the following environment
variables:
LDAP_HOSTNAME The hostname or IP address of your LDAP server.
LDAP_USER_BASE_DN The base DN under which all Guacamole users will be
located. Absolutely all Guacamole users that will
authenticate via LDAP must exist within the subtree of
this DN.
END
exit 1;
fi
# Update config file
set_property "ldap-hostname" "$LDAP_HOSTNAME"
set_optional_property "ldap-port" "$LDAP_PORT"
set_optional_property "ldap-encryption-method" "$LDAP_ENCRYPTION_METHOD"
set_property "ldap-user-base-dn" "$LDAP_USER_BASE_DN"
set_optional_property "ldap-username-attribute" "$LDAP_USERNAME_ATTRIBUTE"
set_optional_property "ldap-group-base-dn" "$LDAP_GROUP_BASE_DN"
set_optional_property "ldap-config-base-dn" "$LDAP_CONFIG_BASE_DN"
set_optional_property \
"ldap-search-bind-dn" \
"$LDAP_SEARCH_BIND_DN"
set_optional_property \
"ldap-search-bind-password" \
"$LDAP_SEARCH_BIND_PASSWORD"
# Add required .jar files to GUACAMOLE_EXT
ln -s /opt/guacamole/ldap/guacamole-auth-*.jar "$GUACAMOLE_EXT"
}
##
## Starts Guacamole under Tomcat, replacing the current process with the
## Tomcat process. As the current process will be replaced, this MUST be the
## last function run within the script.
##
start_guacamole() {
cd /usr/local/tomcat
exec catalina.sh run
}
#
# Start with a fresh GUACAMOLE_HOME
#
rm -Rf "$GUACAMOLE_HOME"
#
# Create and define Guacamole lib and extensions directories
#
mkdir -p "$GUACAMOLE_EXT"
mkdir -p "$GUACAMOLE_LIB"
#
# Point to associated guacd
#
# Verify required link is present
if [ -z "$GUACD_PORT_4822_TCP_ADDR" -o -z "$GUACD_PORT_4822_TCP_PORT" ]; then
cat <<END
FATAL: Missing "guacd" link.
-------------------------------------------------------------------------------
Every Guacamole instance needs a corresponding copy of guacd running. Link a
container to the link named "guacd" to provide this.
END
exit 1;
fi
# Update config file
set_property "guacd-hostname" "$GUACD_PORT_4822_TCP_ADDR"
set_property "guacd-port" "$GUACD_PORT_4822_TCP_PORT"
#
# Track which authentication backends are installed
#
INSTALLED_AUTH=""
# Use MySQL if database specified
if [ -n "$MYSQL_DATABASE" ]; then
associate_mysql
INSTALLED_AUTH="$INSTALLED_AUTH mysql"
fi
# Use PostgreSQL if database specified
if [ -n "$POSTGRES_DATABASE" ]; then
associate_postgresql
INSTALLED_AUTH="$INSTALLED_AUTH postgres"
fi
# Use LDAP directory if specified
if [ -n "$LDAP_HOSTNAME" ]; then
associate_ldap
INSTALLED_AUTH="$INSTALLED_AUTH ldap"
fi
#
# Validate that at least one authentication backend is installed
#
if [ -z "$INSTALLED_AUTH" ]; then
cat <<END
FATAL: No authentication configured
-------------------------------------------------------------------------------
The Guacamole Docker container needs at least one authentication mechanism in
order to function, such as a MySQL database, PostgreSQL database, or LDAP
directory. Please specify at least the MYSQL_DATABASE or POSTGRES_DATABASE
environment variables, or check Guacamole's Docker documentation regarding
configuring LDAP.
END
exit 1;
fi
#
# Finally start Guacamole (under Tomcat)
#
start_guacamole

View File

@@ -1,7 +1,7 @@
{
"NAME" : "Nederlands",
"APP" : {
"ACTION_ACKNOWLEDGE" : "OK",
@@ -125,7 +125,7 @@
"TEXT_CLIENT_STATUS_CONNECTING" : "Verbinden met Guacamole...",
"TEXT_CLIENT_STATUS_DISCONNECTED" : "De verbinding is verbroken.",
"TEXT_CLIENT_STATUS_WAITING" : "Verbonden met Guacamole. Aan het wachten op reactie...",
"TEXT_RECONNECT_COUNTDOWN" : "opnieuw verbinden over {REMAINING} {REMAINING, plural, one{seconde} other{seconden}}...",
"TEXT_RECONNECT_COUNTDOWN" : "Opnieuw verbinden over {REMAINING} {REMAINING, plural, one{seconde} other{seconden}}...",
"TEXT_FILE_TRANSFER_PROGRESS" : "{PROGRESS} {UNIT, select, b{B} kb{KB} mb{MB} gb{GB} other{}}",
"URL_OSK_LAYOUT" : "layouts/nl-nl-qwerty.json"
@@ -153,7 +153,7 @@
"INFO_ACTIVE_USER_COUNT" : "@:APP.INFO_ACTIVE_USER_COUNT",
"INFO_NO_RECENT_CONNECTIONS" : "Geen recente verbindingen.",
"PASSWORD_CHANGED" : "Wachtwoord gewijzigd.",
"SECTION_HEADER_ALL_CONNECTIONS" : "Alle Verbindingen",
@@ -266,7 +266,7 @@
"TEXT_CONFIRM_DELETE" : "Gebruikers kunnen niet worden hersteld nadat ze zijn verwijderd. Weet u zeker dat u deze gebruiker wilt verwijderen?"
},
"PROTOCOL_RDP" : {
"FIELD_HEADER_CLIENT_NAME" : "Client naam:",
@@ -274,6 +274,7 @@
"FIELD_HEADER_CONSOLE" : "Administrator console:",
"FIELD_HEADER_CONSOLE_AUDIO" : "Support audio in console:",
"FIELD_HEADER_CREATE_DRIVE_PATH" : "Automatisch genereren station:",
"FIELD_HEADER_CREATE_RECORDING_PATH" : "Automatisch genereren opname map:",
"FIELD_HEADER_DISABLE_AUDIO" : "Uitschakelen geluid:",
"FIELD_HEADER_DISABLE_AUTH" : "Uitschakelen authenticatie:",
"FIELD_HEADER_DOMAIN" : "Domein:",
@@ -294,6 +295,11 @@
"FIELD_HEADER_INITIAL_PROGRAM" : "Eerste programma:",
"FIELD_HEADER_PASSWORD" : "Wachtwoord:",
"FIELD_HEADER_PORT" : "Poort:",
"FIELD_HEADER_PRECONNECTION_BLOB" : "Voor te bereiden BLOB (VM ID):",
"FIELD_HEADER_PRECONNECTION_ID" : "RDP bron ID:",
"FIELD_HEADER_RECORDING_NAME" : "Opname naam:",
"FIELD_HEADER_RECORDING_PATH" : "Opname map:",
"FIELD_HEADER_RESIZE_METHOD" : "Schaal methode:",
"FIELD_HEADER_REMOTE_APP_ARGS" : "Parameters:",
"FIELD_HEADER_REMOTE_APP_DIR" : "Werk map:",
"FIELD_HEADER_REMOTE_APP" : "Programma:",
@@ -316,6 +322,10 @@
"FIELD_OPTION_COLOR_DEPTH_8" : "256 kleuren",
"FIELD_OPTION_COLOR_DEPTH_EMPTY" : "",
"FIELD_OPTION_RESIZE_METHOD_DISPLAY_UPDATE" : "\"Ververs scherm\" virtueel kanaal (RDP 8.1+)",
"FIELD_OPTION_RESIZE_METHOD_EMPTY" : "",
"FIELD_OPTION_RESIZE_METHOD_RECONNECT" : "Verbind opnieuw",
"FIELD_OPTION_SECURITY_ANY" : "Ieder",
"FIELD_OPTION_SECURITY_EMPTY" : "",
"FIELD_OPTION_SECURITY_NLA" : "NLA (Network Level Authentication)",
@@ -328,6 +338,7 @@
"FIELD_OPTION_SERVER_LAYOUT_FAILSAFE" : "Unicode",
"FIELD_OPTION_SERVER_LAYOUT_FR_FR_AZERTY" : "Frans (Azerty)",
"FIELD_OPTION_SERVER_LAYOUT_IT_IT_QWERTY" : "Italiaans (Qwerty)",
"FIELD_OPTION_SERVER_LAYOUT_JA_JP_QWERTY" : "Japans (Qwerty)",
"FIELD_OPTION_SERVER_LAYOUT_SV_SE_QWERTY" : "Zweeds (Qwerty)",
"NAME" : "RDP",
@@ -338,6 +349,8 @@
"SECTION_HEADER_DISPLAY" : "Scherm",
"SECTION_HEADER_NETWORK" : "Netwerk",
"SECTION_HEADER_PERFORMANCE" : "Prestatie instellingen",
"SECTION_HEADER_PRECONNECTION_PDU" : "Voor te bereiden PDU / Hyper-V",
"SECTION_HEADER_RECORDING" : "Scherm Opname",
"SECTION_HEADER_REMOTEAPP" : "ExterneApp",
"SECTION_HEADER_SFTP" : "SFTP"
@@ -347,6 +360,8 @@
"FIELD_HEADER_COLOR_SCHEME" : "Kleuren combinatie:",
"FIELD_HEADER_COMMAND" : "Uitvoeren opdracht:",
"FIELD_HEADER_CREATE_RECORDING_PATH" : "Automatisch genereren opname map:",
"FIELD_HEADER_CREATE_TYPESCRIPT_PATH" : "Automatisch genereren typescript map:",
"FIELD_HEADER_FONT_NAME" : "Fontnaam:",
"FIELD_HEADER_FONT_SIZE" : "Fontgrootte:",
"FIELD_HEADER_ENABLE_SFTP" : "SFTP mogelijk maken:",
@@ -356,6 +371,10 @@
"FIELD_HEADER_PASSPHRASE" : "Wachtwoordzin:",
"FIELD_HEADER_PORT" : "Poort:",
"FIELD_HEADER_PRIVATE_KEY" : "Persoonlijke sleutel:",
"FIELD_HEADER_RECORDING_NAME" : "Opname naam:",
"FIELD_HEADER_RECORDING_PATH" : "Opname map:",
"FIELD_HEADER_TYPESCRIPT_NAME" : "Typescript naam:",
"FIELD_HEADER_TYPESCRIPT_PATH" : "Typescript map:",
"FIELD_OPTION_COLOR_SCHEME_BLACK_WHITE" : "Zwart op wit",
"FIELD_OPTION_COLOR_SCHEME_EMPTY" : "",
@@ -384,7 +403,9 @@
"SECTION_HEADER_AUTHENTICATION" : "Authenticatie",
"SECTION_HEADER_DISPLAY" : "Scherm",
"SECTION_HEADER_NETWORK" : "Netwerk",
"SECTION_HEADER_RECORDING" : "Scherm Opname",
"SECTION_HEADER_SESSION" : "Sessie / Omgeving",
"SECTION_HEADER_TYPESCRIPT" : "Typescript (Tekst sessie opname)",
"SECTION_HEADER_SFTP" : "SFTP"
},
@@ -392,6 +413,8 @@
"PROTOCOL_TELNET" : {
"FIELD_HEADER_COLOR_SCHEME" : "Kleuren combinatie:",
"FIELD_HEADER_CREATE_RECORDING_PATH" : "Automatisch genereren opname map:",
"FIELD_HEADER_CREATE_TYPESCRIPT_PATH" : "Automatisch genereren typescript map:",
"FIELD_HEADER_FONT_NAME" : "Fontnaam:",
"FIELD_HEADER_FONT_SIZE" : "Fontgrootte:",
"FIELD_HEADER_HOSTNAME" : "Servernaam:",
@@ -399,6 +422,10 @@
"FIELD_HEADER_PASSWORD" : "Wachtwoord:",
"FIELD_HEADER_PASSWORD_REGEX" : "Wachtwoord reguliere expressie:",
"FIELD_HEADER_PORT" : "Poort:",
"FIELD_HEADER_RECORDING_NAME" : "Opname naam:",
"FIELD_HEADER_RECORDING_PATH" : "Opname map:",
"FIELD_HEADER_TYPESCRIPT_NAME" : "Typescript naam:",
"FIELD_HEADER_TYPESCRIPT_PATH" : "Typescript map:",
"FIELD_OPTION_COLOR_SCHEME_BLACK_WHITE" : "Zwart op wit",
"FIELD_OPTION_COLOR_SCHEME_EMPTY" : "",
@@ -426,6 +453,8 @@
"SECTION_HEADER_AUTHENTICATION" : "Authenticatie",
"SECTION_HEADER_DISPLAY" : "Scherm",
"SECTION_HEADER_RECORDING" : "Scherm Opname",
"SECTION_HEADER_TYPESCRIPT" : "Typescript (Tekst Sessie Opname)",
"SECTION_HEADER_NETWORK" : "Netwerk"
},
@@ -435,6 +464,7 @@
"FIELD_HEADER_AUDIO_SERVERNAME" : "Audio server naam:",
"FIELD_HEADER_CLIPBOARD_ENCODING" : "Encodering:",
"FIELD_HEADER_COLOR_DEPTH" : "Kleurdiepte:",
"FIELD_HEADER_CREATE_RECORDING_PATH" : "Automatisch genereren opname map:",
"FIELD_HEADER_CURSOR" : "Cursor:",
"FIELD_HEADER_DEST_HOST" : "Externe server:",
"FIELD_HEADER_DEST_PORT" : "Externe poort:",
@@ -444,6 +474,8 @@
"FIELD_HEADER_PASSWORD" : "Wachtwoord:",
"FIELD_HEADER_PORT" : "Poort:",
"FIELD_HEADER_READ_ONLY" : "Alleen lezen:",
"FIELD_HEADER_RECORDING_NAME" : "Opname naam:",
"FIELD_HEADER_RECORDING_PATH" : "Opname map:",
"FIELD_HEADER_SFTP_DIRECTORY" : "Standaard upload map:",
"FIELD_HEADER_SFTP_HOSTNAME" : "Servernaam:",
"FIELD_HEADER_SFTP_PASSPHRASE" : "Wachtwoordzin:",
@@ -476,6 +508,7 @@
"SECTION_HEADER_CLIPBOARD" : "Klembord",
"SECTION_HEADER_DISPLAY" : "Scherm",
"SECTION_HEADER_NETWORK" : "Netwerk",
"SECTION_HEADER_RECORDING" : "Scherm Opname",
"SECTION_HEADER_REPEATER" : "VNC Repeater",
"SECTION_HEADER_SFTP" : "SFTP"
@@ -544,7 +577,7 @@
"FIELD_HEADER_PASSWORD_NEW" : "Nieuw Wachtwoord:",
"FIELD_HEADER_PASSWORD_NEW_AGAIN" : "Bevestig Nieuw Wachtwoord:",
"FIELD_HEADER_USERNAME" : "Gebruikersnaam:",
"HELP_DEFAULT_INPUT_METHOD" : "De standaard invoer methode bepaalt hoe toetsenbord gebeurtenissen ontvangen worden door Guacamole. Het veranderen van deze instelling kan nodig zijn bij gebruik van een mobiel apparaat of wanneer er via een IME getypt wordt. Deze instelling kan per verbinding worden overschreven via het Guacamole menu.",
"HELP_DEFAULT_MOUSE_MODE" : "De standaard muis emulatie modus bepaalt hoe de externe muis in nieuwe verbindingen omgaat met touch. Deze instelling kan per verbinding worden overschreven via het Guacamole menu.",
"HELP_INPUT_METHOD_NONE" : "@:CLIENT.HELP_INPUT_METHOD_NONE",
@@ -581,22 +614,22 @@
"SECTION_HEADER_USERS" : "Gebruikers"
},
"SETTINGS_SESSIONS" : {
"ACTION_ACKNOWLEDGE" : "@:APP.ACTION_ACKNOWLEDGE",
"ACTION_CANCEL" : "@:APP.ACTION_CANCEL",
"ACTION_DELETE" : "Beeindig Sessies",
"DIALOG_HEADER_CONFIRM_DELETE" : "Beeindig Sessie",
"DIALOG_HEADER_ERROR" : "@:APP.DIALOG_HEADER_ERROR",
"FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER",
"FORMAT_STARTDATE" : "@:APP.FORMAT_DATE_TIME_PRECISE",
"HELP_SESSIONS" : "Alle Guacamole sessies die op dit moment actief zijn worden hier getoond. Als u een of meerdere sessies wilt beeindigen, vink die sessie(s) dan aan en klik op \"Beeindig Sessies\". Door het verbreken van een sessie verliest de gebruiker ogenblikkelijk het contact met die sessie(s).",
"INFO_NO_SESSIONS" : "Geen actieve sessies",
"SECTION_HEADER_SESSIONS" : "Actieve Sessies",