This commit is contained in:
oznu
2018-04-05 17:46:50 +10:00
parent 257a66056d
commit 2079ed3891
6 changed files with 27 additions and 15 deletions
+7 -5
View File
@@ -1,7 +1,7 @@
FROM library/tomcat:7-jre8
ENV ARCH=amd64 \
GUAC_VER=0.9.13-incubating \
GUAC_VER=0.9.14 \
GUACAMOLE_HOME=/app/guacamole \
PG_MAJOR=9.6 \
PGDATA=/config/postgres \
@@ -46,18 +46,20 @@ RUN curl -SLO "https://sourceforge.net/projects/guacamole/files/current/source/g
&& ldconfig
# Install guacamole-client and postgres auth adapter
RUN rm -rf ${CATALINA_HOME}/webapps/ROOT \
RUN set -x \
&& rm -rf ${CATALINA_HOME}/webapps/ROOT \
&& curl -SLo ${CATALINA_HOME}/webapps/ROOT.war "https://sourceforge.net/projects/guacamole/files/current/binary/guacamole-${GUAC_VER}.war" \
&& curl -SLo ${GUACAMOLE_HOME}/lib/postgresql-42.1.4.jar "https://jdbc.postgresql.org/download/postgresql-42.1.4.jar" \
&& curl -SLO https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-jdbc-${GUAC_VER}.tar.gz \
&& tar -xzf guacamole-auth-jdbc-${GUAC_VER}.tar.gz \
&& cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/guacamole-auth-jdbc-postgresql-0.9.13-incubating.jar ${GUACAMOLE_HOME}/extensions/ \
&& cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/guacamole-auth-jdbc-postgresql-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions/ \
&& cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/schema ${GUACAMOLE_HOME}/ \
&& rm -rf guacamole-auth-jdbc-${GUAC_VER} guacamole-auth-jdbc-${GUAC_VER}.tar.gz
# Add optional extensions
RUN mkdir ${GUACAMOLE_HOME}/extensions-available \
&& for i in auth-ldap auth-duo auth-header auth-noauth auth-cas; do \
RUN set -xe \
&& mkdir ${GUACAMOLE_HOME}/extensions-available \
&& for i in auth-ldap auth-duo auth-header auth-noauth auth-cas auth-openid; do \
echo "https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-${i}-${GUAC_VER}.tar.gz" \
&& curl -SLO "https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-${i}-${GUAC_VER}.tar.gz" \
&& tar -xzf guacamole-${i}-${GUAC_VER}.tar.gz \
+7 -5
View File
@@ -1,7 +1,7 @@
FROM arm32v5/tomcat:7-jre8
ENV ARCH=armhf \
GUAC_VER=0.9.13-incubating \
GUAC_VER=0.9.14 \
GUACAMOLE_HOME=/app/guacamole \
PG_MAJOR=9.6 \
PGDATA=/config/postgres \
@@ -46,18 +46,20 @@ RUN curl -SLO "https://sourceforge.net/projects/guacamole/files/current/source/g
&& ldconfig
# Install guacamole-client and postgres auth adapter
RUN rm -rf ${CATALINA_HOME}/webapps/ROOT \
RUN set -x \
&& rm -rf ${CATALINA_HOME}/webapps/ROOT \
&& curl -SLo ${CATALINA_HOME}/webapps/ROOT.war "https://sourceforge.net/projects/guacamole/files/current/binary/guacamole-${GUAC_VER}.war" \
&& curl -SLo ${GUACAMOLE_HOME}/lib/postgresql-42.1.4.jar "https://jdbc.postgresql.org/download/postgresql-42.1.4.jar" \
&& curl -SLO https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-jdbc-${GUAC_VER}.tar.gz \
&& tar -xzf guacamole-auth-jdbc-${GUAC_VER}.tar.gz \
&& cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/guacamole-auth-jdbc-postgresql-0.9.13-incubating.jar ${GUACAMOLE_HOME}/extensions/ \
&& cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/guacamole-auth-jdbc-postgresql-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions/ \
&& cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/schema ${GUACAMOLE_HOME}/ \
&& rm -rf guacamole-auth-jdbc-${GUAC_VER} guacamole-auth-jdbc-${GUAC_VER}.tar.gz
# Add optional extensions
RUN mkdir ${GUACAMOLE_HOME}/extensions-available \
&& for i in auth-ldap auth-duo auth-header auth-noauth auth-cas; do \
RUN set -xe \
&& mkdir ${GUACAMOLE_HOME}/extensions-available \
&& for i in auth-ldap auth-duo auth-header auth-noauth auth-cas auth-openid; do \
echo "https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-${i}-${GUAC_VER}.tar.gz" \
&& curl -SLO "https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-${i}-${GUAC_VER}.tar.gz" \
&& tar -xzf guacamole-${i}-${GUAC_VER}.tar.gz \
+5 -4
View File
@@ -54,10 +54,11 @@ docker run \
Currently the available extensions are:
* auth-ldap - [LDAP Authentication](https://guacamole.incubator.apache.org/doc/0.9.13-incubating/gug/ldap-auth.html)
* auth-duo - [Duo two-factor authentication](https://guacamole.incubator.apache.org/doc/0.9.13-incubating/gug/duo-auth.html)
* auth-header - [HTTP header authentication](https://guacamole.incubator.apache.org/doc/0.9.13-incubating/gug/header-auth.html)
* auth-cas - [CAS Authentication](https://guacamole.incubator.apache.org/doc/0.9.13-incubating/gug/cas-auth.html)
* auth-ldap - [LDAP Authentication](https://guacamole.incubator.apache.org/doc/0.9.14/gug/ldap-auth.html)
* auth-duo - [Duo two-factor authentication](https://guacamole.incubator.apache.org/doc/0.9.14/gug/duo-auth.html)
* auth-header - [HTTP header authentication](https://guacamole.incubator.apache.org/doc/0.9.14/gug/header-auth.html)
* auth-cas - [CAS Authentication](https://guacamole.incubator.apache.org/doc/0.9.14/gug/cas-auth.html)
* auth-openid - [OpenID Connect authentication](http://guacamole.apache.org/doc/0.9.14/gug/openid-auth.html)
You should only enable the extensions you require, if an extensions is not configured correctly in the `guacamole.properties` file it may prevent the system from loading. See the [official documentation](https://guacamole.incubator.apache.org/doc/0.9.13-incubating/gug/) for more details.
+1
View File
@@ -1,3 +1,4 @@
#!/usr/bin/with-contenv sh
cp -rn /app/guacamole /config
mkdir -p /root/.config/freerdp/known_hosts
+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/with-contenv sh
# clean up extensions
for i in auth-ldap auth-duo auth-header auth-noauth auth-cas; do
for i in auth-ldap auth-duo auth-header auth-noauth auth-cas auth-openid; do
rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
done
+6
View File
@@ -11,6 +11,12 @@ if [ $? -ne 0 ]; then
createuser -U postgres $POSTGRES_USER
createdb -U postgres -O $POSTGRES_USER $POSTGRES_DB
cat /app/guacamole/schema/*.sql | psql -U $POSTGRES_USER -d $POSTGRES_DB -f -
echo "0.9.14" > /config/.database-version
else
if [ "$(cat /config/.database-version)" != "0.9.14" ]; then
cat /app/guacamole/schema/upgrade/upgrade-pre-0.9.14.sql | psql -U $POSTGRES_USER -d $POSTGRES_DB -f -
echo "0.9.14" > /config/.database-version
fi
fi
echo "Starting guacamole client..."