Initial commit.

master
Icedream 2018-05-07 19:37:24 +02:00
commit 8deb2601f2
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
4 changed files with 229 additions and 0 deletions

79
Dockerfile Normal file
View File

@ -0,0 +1,79 @@
#
# 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
#
# Use args for Tomcat image label to allow image builder to choose alternatives
# such as `--build-arg TOMCAT_JRE=jre8-alpine`
#
ARG TOMCAT_VERSION=8.0.20
ARG TOMCAT_JRE=jre8
# Use official maven image for the build
FROM maven:3-jdk-8 AS builder
ARG GUACAMOLE_GIT_URL=https://github.com/apache/guacamole-client.git
ARG GUACAMOLE_VERSION=0.9.14
# Build environment variables
ENV \
BUILD_DIR=/tmp/guacamole-docker-BUILD
# Copy source to container for sake of build
RUN \
set -x \
&& git clone --recursive -b "${GUACAMOLE_VERSION}" "${GUACAMOLE_GIT_URL}" "${BUILD_DIR}"
# Apply patches
COPY patches/ /patches/
RUN cd "${BUILD_DIR}" \
&& set -x \
&& for patch in /patches/*.patch; do \
echo Applying patch: $patch \
&& git apply "$patch" \
; done \
&& for script in /patches/*.sh; do \
echo Running patch script: $script; \
chmod -v +x "$script"; \
"$script"; \
done
# Add configuration scripts
RUN mkdir -p /opt/guacamole/
RUN cp -rv "${BUILD_DIR}/guacamole-docker/bin/" /opt/guacamole/bin/
# Run the build itself
RUN /opt/guacamole/bin/build-guacamole.sh "$BUILD_DIR" /opt/guacamole
# For the runtime image, we start with the official Tomcat distribution
FROM tomcat:${TOMCAT_VERSION}-${TOMCAT_JRE}
# This is where the build artifacts go in the runtime image
WORKDIR /opt/guacamole
# Copy artifacts from builder image into this image
COPY --from=builder /opt/guacamole/ .
# Start Guacamole under Tomcat, listening on 0.0.0.0:8080
EXPOSE 8080
CMD ["/opt/guacamole/bin/start.sh" ]

View File

@ -0,0 +1,62 @@
From 77a8ef246f5dccdcf0c948f5e28f0afb9da01fb7 Mon Sep 17 00:00:00 2001
From: Carl Kittelberger <icedream@icedream.pw>
Date: Mon, 7 May 2018 19:04:16 +0200
Subject: [PATCH 1/2] Remove references to project version.
---
guacamole/src/main/webapp/index.html | 4 ++--
guacamole/src/main/webapp/translations/en.json | 2 +-
guacamole/src/main/webapp/translations/no.json | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/guacamole/src/main/webapp/index.html b/guacamole/src/main/webapp/index.html
index 7d747cf..1c5e4de 100644
--- a/guacamole/src/main/webapp/index.html
+++ b/guacamole/src/main/webapp/index.html
@@ -26,7 +26,7 @@
<link rel="icon" type="image/png" href="images/logo-64.png"/>
<link rel="icon" type="image/png" sizes="144x144" href="images/logo-144.png"/>
<link rel="apple-touch-icon" type="image/png" href="images/logo-144.png"/>
- <link rel="stylesheet" type="text/css" href="app.css?v=${project.version}">
+ <link rel="stylesheet" type="text/css" href="app.css">
<title ng-bind="page.title | translate"></title>
</head>
<body ng-class="page.bodyClassName">
@@ -79,7 +79,7 @@
<script type="text/javascript" src="webjars/angular-module-shim/0.0.4/angular-module-shim.js"></script>
<!-- Web application -->
- <script type="text/javascript" src="app.js?v=${project.version}"></script>
+ <script type="text/javascript" src="app.js"></script>
</body>
</html>
diff --git a/guacamole/src/main/webapp/translations/en.json b/guacamole/src/main/webapp/translations/en.json
index a64f64c..056fdd3 100644
--- a/guacamole/src/main/webapp/translations/en.json
+++ b/guacamole/src/main/webapp/translations/en.json
@@ -5,7 +5,7 @@
"APP" : {
"NAME" : "Apache Guacamole",
- "VERSION" : "${project.version}",
+ "VERSION" : "",
"ACTION_ACKNOWLEDGE" : "OK",
"ACTION_CANCEL" : "Cancel",
diff --git a/guacamole/src/main/webapp/translations/no.json b/guacamole/src/main/webapp/translations/no.json
index 30ea871..1d43d52 100644
--- a/guacamole/src/main/webapp/translations/no.json
+++ b/guacamole/src/main/webapp/translations/no.json
@@ -38,7 +38,7 @@
"INFO_ACTIVE_USER_COUNT" : "Blir brukt av {USERS} {USERS, plural, one{user} other{users}}.",
- "NAME" : "Guacamole ${project.version}",
+ "NAME" : "Guacamole",
"TEXT_HISTORY_DURATION" : "{VALUE} {UNIT, select, second{{VALUE, plural, one{second} other{seconds}}} minute{{VALUE, plural, one{minute} other{minutes}}} hour{{VALUE, plural, one{hour} other{hours}}} day{{VALUE, plural, one{day} other{days}}} other{}}"
--
2.10.0.windows.1

View File

@ -0,0 +1,84 @@
From 4463c8ce139e30595e37e27e8a7fade14ec1e8d7 Mon Sep 17 00:00:00 2001
From: Carl Kittelberger <icedream@icedream.pw>
Date: Mon, 7 May 2018 19:04:37 +0200
Subject: [PATCH 2/2] Remove version from web interface.
---
.../src/main/webapp/app/login/styles/dialog.css | 36 +---------------------
.../src/main/webapp/app/login/templates/login.html | 6 +---
2 files changed, 2 insertions(+), 40 deletions(-)
diff --git a/guacamole/src/main/webapp/app/login/styles/dialog.css b/guacamole/src/main/webapp/app/login/styles/dialog.css
index c9c6a4a..a46c4f0 100644
--- a/guacamole/src/main/webapp/app/login/styles/dialog.css
+++ b/guacamole/src/main/webapp/app/login/styles/dialog.css
@@ -70,39 +70,6 @@
text-shadow: 1px 1px white;
}
-.login-ui .login-dialog .version {
- padding: 0.5em 0;
-}
-
-.login-ui .login-dialog .version .app-name {
- font-weight: bold;
- text-transform: uppercase;
- text-align: center;
- font-size: 1.25em;
-}
-
-.login-ui .login-dialog .version .version-number {
-
- position: absolute;
- right: 0;
- bottom: 0;
-
- padding: 0.25em 0.75em;
- margin: 0.25em;
-
- -moz-border-radius: 0.5em;
- -webkit-border-radius: 0.5em;
- -khtml-border-radius: 0.5em;
- border-radius: 0.5em;
-
- color: white;
- background: green;
- font-size: 0.5em;
- font-style: italic;
- opacity: 0.5;
-
-}
-
.login-ui .login-dialog .logo {
display: block;
margin: 0.5em auto;
@@ -122,7 +89,6 @@
max-width: 6in;
}
-.login-ui.continuation .login-dialog .logo,
-.login-ui.continuation .login-dialog .version {
+.login-ui.continuation .login-dialog .logo {
display: none;
}
diff --git a/guacamole/src/main/webapp/app/login/templates/login.html b/guacamole/src/main/webapp/app/login/templates/login.html
index 26a3f18..887e1fd 100644
--- a/guacamole/src/main/webapp/app/login/templates/login.html
+++ b/guacamole/src/main/webapp/app/login/templates/login.html
@@ -10,12 +10,8 @@
<form class="login-form" ng-submit="login()">
- <!-- Guacamole version -->
+ <!-- Guacamole logo -->
<div class="logo"></div>
- <div class="version">
- <div class="app-name">{{'APP.NAME' | translate}}</div>
- <div class="version-number">{{'APP.VERSION' | translate}}</div>
- </div>
<!-- Login message/instructions -->
<p ng-show="helpText" translate="{{helpText.key}}"
--
2.10.0.windows.1

View File

@ -0,0 +1,4 @@
#!/bin/sh
sed -i \
'/Guacamole.API_VERSION = "[[:digit:]]\+.[[:digit:]]\+.[[:digit:]]\+"/d' \
guacamole-common-js/src/main/webapp/modules/Version.js