Custom Docker Images
Creating custom Docker images based on Keeper Connection Manager packages
Overview
The main Keeper Connection Manager packages include default Docker entry points, allowing deployments of Keeper Connection Manager to be automated with Docker, even if your deployment is customized with your own branding, third-party authentication extensions, or organization-specific settings.
A simple Dockerfile can be created which accomplishes the following tasks:
Copy a
.repo
file into/etc/yum.repos.d/
so the Docker image build has access to the Keeper Connection Manager packages.Install any required packages for your use case.
Remove the
.repo
file so your image doesn't contain your repository credentials.Apply any desired configuration (such as through a
guacamole.properties.docker
file).Configure the environment as required for installing the Keeper Connection Manager packages used by the image (such as adding the
tomcat
user to any necessary groups or deployingguacamole.war
).Start one of the provided Docker entrypoints.
The Keeper Connection Manager packages currently include three Docker entrypoints ready for use within custom images. Which entrypoint(s) you use will depend on whether you are creating separate images for Apache Guacamole and guacd vs. an all-in-one image which contains both:
Docker entrypoint which starts both the Guacamole web application and the guacd daemon. This entrypoint is part of the kcm package and additionally requires gettext to be installed.
Docker entrypoint which starts only the Guacamole web application. A separate container will be needed for guacd. This entrypoint is part of the kcm package and additionally requires gettext to be installed.
Docker entrypoint which starts only the guacd daemon. A separate container will be needed for the Guacamole web application. This entrypoint is part of the kcm package
Configuring Guacamole using guacamole.properties.docker
guacamole.properties.docker
The entrypoint-combined.sh
and entrypoint-guacamole.sh
entrypoints will both check for the existence of an optional /etc/guacamole/guacamole.properties.docker
file. If this file exists, it will be automatically filtered such that environment variables are substituted within the contents of the file. The filtered contents of this file will be written to /etc/guacamole/guacamole.properties
, overwriting the original file, but omitting any properties which remain unset after filtering.
The filtering applied to guacamole.properties.docker
leverages the envsubst
utility provided by the gettext package. The gettext package must be installed within any Docker container intended to leverage guacamole.properties.docker
.
For example, if an /etc/guacamole/guacamole.properties
file exists within a Guacamole-only or combined image containing the following:
The main guacamole.properties
will be generated using this as a template, substituting the values of the DATABASE_HOSTNAME, DATABASE_USERNAME, DATABASE_PASSWORD, LDAP_HOSTNAME, and LDAP_PORT environment variables. If only the DATABASE variables are set, then properties which depend on other values will automatically be omitted:
guacamole.properties.docker
can thus be used to provide a completely custom set of configuration options. Your image need only support the options you specifically need.
Creating an all-in-one image using the combined entrypoint
An all-in-one Docker image for Guacamole contains both the Guacamole web application and guacd. An image which contains both Guacamole and guacd will require at least the following packages:
kcm-guacamole
kcm-guacd
tomcat
If using LDAP and/or one of the supported databases for authentication, the relevant packages for those authentication methods will also be installed:
kcm-guacamole-auth-duo
kcm-guacamole-auth-json
kcm-guacamole-auth-ldap
kcm-guacamole-auth-mysql
kcm-guacamole-auth-postgresql
kcm-guacamole-auth-sqlserver
kcm-guacamole-auth-totp
You must also install at least one package providing protocol support. The packages required depend only on the protocols you intend to support, which may well be all protocols supported by Guacamole:
kcm-libguac-client-rdp
kcm-libguac-client-ssh
kcm-libguac-client-telnet
kcm-libguac-client-vnc
If providing support for telnet, you will also need to configure your image to use the EPEL repository by installing the epel-release package. This package will need to be installed before the kcm-libguac-client-telnet package, as its dependencies will not be able to be satisfied without EPEL:
epel-release
If you will be using guacamole.properties.docker
to provide configuration options that leverage environment variables, the gettext package is required
gettext
A combined Dockerfile which provides support for absolutely all protocols, uses MySQL for authentication, and leverages guacamole.properties.docker
would look like the following:
Creating a separate Guacamole image (without guacd)
A Docker image contains only the Guacamole web application will require at least the following packages:
kcm-guacamole
tomcat
If using LDAP and/or one of the supported databases for authentication, the relevant packages for those authentication methods will also be installed:
kcm-guacamole-auth-saml
kcm-guacamole-auth-openid
kcm-guacamole-auth-duo
kcm-guacamole-auth-json
kcm-guacamole-auth-ldap
kcm-guacamole-auth-mysql
kcm-guacamole-auth-postgresql
kcm-guacamole-auth-sqlserver
kcm-guacamole-auth-totp
If you will be using guacamole.properties.docker
to provide configuration options that leverage environment variables, the gettext package is required
gettext
A Dockerfile which contains only the web application, uses MySQL for authentication, and which leverages guacamole.properties.docker
would look like the following:
Creating a separate guacd image (without Guacamole)
A Docker image which contains only guacd will require at least the kcm-guacd package:
kcm-guacd
You must also install at least one package providing protocol support. The packages required depend only on the protocols you intend to support, which may well be all protocols supported by Guacamole:
kcm-libguac-client-rdp
kcm-libguac-client-ssh
kcm-libguac-client-telnet
kcm-libguac-client-vnc
If providing support for telnet, you will also need to configure your image to use the EPEL repository by installing the epel-release package. This package will need to be installed before the kcm-libguac-client-telnet package, as its dependencies will not be able to be satisfied without EPEL:
epel-release
A Dockerfile which contains only guacd and provides support for absolutely all protocols would look like the following:
Last updated
Was this helpful?