From 87b394ddac19dec6199bc10840a6a58c243e2970 Mon Sep 17 00:00:00 2001 From: oznu Date: Thu, 17 Jan 2019 16:26:53 +1100 Subject: [PATCH] 1.0.0 --- Dockerfile | 14 +++++++------- Dockerfile.raspberry-pi | 14 +++++++------- README.md | 19 ++++++++++--------- root/etc/cont-init.d/50-extensions | 2 +- root/etc/services.d/guacamole/run | 8 ++++---- 5 files changed, 29 insertions(+), 28 deletions(-) diff --git a/Dockerfile b/Dockerfile index 42c50e0..8bf8c6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM library/tomcat:9-jre8 ENV ARCH=amd64 \ - GUAC_VER=0.9.14 \ + GUAC_VER=1.0.0 \ GUACAMOLE_HOME=/app/guacamole \ PG_MAJOR=9.6 \ PGDATA=/config/postgres \ @@ -35,7 +35,7 @@ RUN [ "$ARCH" = "armhf" ] && ln -s /usr/local/lib/freerdp /usr/lib/arm-linux-gnu RUN [ "$ARCH" = "amd64" ] && ln -s /usr/local/lib/freerdp /usr/lib/x86_64-linux-gnu/freerdp || exit 0 # Install guacamole-server -RUN curl -SLO "https://sourceforge.net/projects/guacamole/files/current/source/guacamole-server-${GUAC_VER}.tar.gz" \ +RUN curl -SLO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/source/guacamole-server-${GUAC_VER}.tar.gz" \ && tar -xzf guacamole-server-${GUAC_VER}.tar.gz \ && cd guacamole-server-${GUAC_VER} \ && ./configure \ @@ -48,9 +48,9 @@ RUN curl -SLO "https://sourceforge.net/projects/guacamole/files/current/source/g # Install guacamole-client and postgres auth adapter 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 ${CATALINA_HOME}/webapps/ROOT.war "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/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 \ + && curl -SLO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/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-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions/ \ && cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/schema ${GUACAMOLE_HOME}/ \ @@ -59,9 +59,9 @@ RUN set -x \ # Add optional extensions 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" \ + && for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp; do \ + echo "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \ + && curl -SLO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \ && tar -xzf guacamole-${i}-${GUAC_VER}.tar.gz \ && cp guacamole-${i}-${GUAC_VER}/guacamole-${i}-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \ && rm -rf guacamole-${i}-${GUAC_VER} guacamole-${i}-${GUAC_VER}.tar.gz \ diff --git a/Dockerfile.raspberry-pi b/Dockerfile.raspberry-pi index 9d254cb..5f553e4 100644 --- a/Dockerfile.raspberry-pi +++ b/Dockerfile.raspberry-pi @@ -1,7 +1,7 @@ FROM arm32v5/tomcat:9-jre8 ENV ARCH=armhf \ - GUAC_VER=0.9.14 \ + GUAC_VER=1.0.0 \ GUACAMOLE_HOME=/app/guacamole \ PG_MAJOR=9.6 \ PGDATA=/config/postgres \ @@ -35,7 +35,7 @@ RUN [ "$ARCH" = "armhf" ] && ln -s /usr/local/lib/freerdp /usr/lib/arm-linux-gnu RUN [ "$ARCH" = "amd64" ] && ln -s /usr/local/lib/freerdp /usr/lib/x86_64-linux-gnu/freerdp || exit 0 # Install guacamole-server -RUN curl -SLO "https://sourceforge.net/projects/guacamole/files/current/source/guacamole-server-${GUAC_VER}.tar.gz" \ +RUN curl -SLO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/source/guacamole-server-${GUAC_VER}.tar.gz" \ && tar -xzf guacamole-server-${GUAC_VER}.tar.gz \ && cd guacamole-server-${GUAC_VER} \ && ./configure \ @@ -48,9 +48,9 @@ RUN curl -SLO "https://sourceforge.net/projects/guacamole/files/current/source/g # Install guacamole-client and postgres auth adapter 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 ${CATALINA_HOME}/webapps/ROOT.war "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/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 \ + && curl -SLO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/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-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions/ \ && cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/schema ${GUACAMOLE_HOME}/ \ @@ -59,9 +59,9 @@ RUN set -x \ # Add optional extensions 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" \ + && for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp; do \ + echo "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \ + && curl -SLO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \ && tar -xzf guacamole-${i}-${GUAC_VER}.tar.gz \ && cp guacamole-${i}-${GUAC_VER}/guacamole-${i}-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \ && rm -rf guacamole-${i}-${GUAC_VER} guacamole-${i}-${GUAC_VER}.tar.gz \ diff --git a/README.md b/README.md index 554200c..d7005de 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ # Docker Guacamole -A Docker Container for [Apache Guacamole](https://guacamole.incubator.apache.org/), a client-less remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH over HTML5. +A Docker Container for [Apache Guacamole](https://guacamole.apache.org/), a client-less remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH over HTML5. -This image will run on most platforms that support Docker including Docker for Mac, Docker for Windows, Synology DSM and Raspberry Pi 2/3 boards. +This image will run on most platforms that support Docker including Docker for Mac, Docker for Windows, Synology DSM and Raspberry Pi 3 boards. [![IMAGE ALT TEXT](http://img.youtube.com/vi/esgaHNRxdhY/0.jpg)](http://www.youtube.com/watch?v=esgaHNRxdhY "Video Title") @@ -21,7 +21,7 @@ docker run \ ## Raspberry Pi / ARMv6 -This image will also allow you to run [Apache Guacamole](https://guacamole.incubator.apache.org/) on a Raspberry Pi or other Docker-enabled ARMv5/6/7/8 devices by using the `armhf` tag. +This image will also allow you to run [Apache Guacamole](https://guacamole.apache.org/) on a Raspberry Pi or other Docker-enabled ARMv5/6/7/8 devices by using the `armhf` tag. ```shell docker run \ @@ -54,13 +54,14 @@ docker run \ Currently the available extensions are: -* 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) +* auth-ldap - [LDAP Authentication](https://guacamole.apache.org/doc/gug/ldap-auth.html) +* auth-duo - [Duo two-factor authentication](https://guacamole.apache.org/doc/gug/duo-auth.html) +* auth-header - [HTTP header authentication](https://guacamole.apache.org/doc/gug/header-auth.html) +* auth-cas - [CAS Authentication](https://guacamole.apache.org/doc/gug/cas-auth.html) +* auth-openid - [OpenID Connect authentication](https://guacamole.apache.org/doc/gug/openid-auth.html) +* auth-totp - [TOTP two-factor authentication](https://guacamole.apache.org/doc/gug/totp-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. +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.apache.org/doc/gug/) for more details. ## Default User diff --git a/root/etc/cont-init.d/50-extensions b/root/etc/cont-init.d/50-extensions index 2a2e110..f692762 100644 --- a/root/etc/cont-init.d/50-extensions +++ b/root/etc/cont-init.d/50-extensions @@ -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 auth-openid; do +for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp; do rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar done diff --git a/root/etc/services.d/guacamole/run b/root/etc/services.d/guacamole/run index cff16b1..72a9bd5 100644 --- a/root/etc/services.d/guacamole/run +++ b/root/etc/services.d/guacamole/run @@ -11,11 +11,11 @@ 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 + echo "$GUAC_VER" > /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 + if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then + cat /app/guacamole/schema/upgrade/upgrade-pre-$GUAC_VER.sql | psql -U $POSTGRES_USER -d $POSTGRES_DB -f - + echo "$GUAC_VER" > /config/.database-version fi fi