You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2017/10/08 06:14:50 UTC

[1/6] incubator-guacamole-client git commit: GUACAMOLE-408: revise Dockerfile to use multi-stage image build

Repository: incubator-guacamole-client
Updated Branches:
  refs/heads/master 153996b72 -> b8abcd675


GUACAMOLE-408: revise Dockerfile to use multi-stage image build


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/5c07e4a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/5c07e4a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/5c07e4a4

Branch: refs/heads/master
Commit: 5c07e4a4eeabf68c5fa1ea24ced373ac8d697bbf
Parents: 153996b
Author: Carl Harris <ce...@vt.edu>
Authored: Sat Oct 7 10:07:20 2017 -0400
Committer: Carl Harris <ce...@vt.edu>
Committed: Sat Oct 7 10:07:20 2017 -0400

----------------------------------------------------------------------
 Dockerfile | 37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5c07e4a4/Dockerfile
----------------------------------------------------------------------
diff --git a/Dockerfile b/Dockerfile
index bd8131f..ebc3cb0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,29 +21,36 @@
 # Dockerfile for guacamole-client
 #
 
-# Start from Tomcat image
-FROM tomcat:8.0.20-jre8
+# 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
 
-# Environment variables
+# Build environment variables
 ENV \
-    BUILD_DIR=/tmp/guacamole-docker-BUILD \
-    BUILD_DEPENDENCIES="                  \
-        maven                             \
-        openjdk-8-jdk-headless"
+    BUILD_DIR=/tmp/guacamole-docker-BUILD
 
 # Add configuration scripts
-COPY guacamole-docker/bin /opt/guacamole/bin/
+COPY guacamole-docker/bin/ /opt/guacamole/bin/
 
 # Copy source to container for sake of build
 COPY . "$BUILD_DIR"
 
-# Build latest guacamole-client and authentication
-RUN apt-get update                                                    && \
-    apt-get install -y --no-install-recommends $BUILD_DEPENDENCIES    && \
-    /opt/guacamole/bin/build-guacamole.sh "$BUILD_DIR" /opt/guacamole && \
-    rm -Rf "$BUILD_DIR"                                               && \
-    rm -Rf /var/lib/apt/lists/*                                       && \
-    apt-get purge -y --auto-remove $BUILD_DEPENDENCIES
+# 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


[2/6] incubator-guacamole-client git commit: GUACAMOLE-408: don't try to clean up the local Maven repository

Posted by mj...@apache.org.
GUACAMOLE-408: don't try to clean up the local Maven repository

There's no need to clean up the local Maven repository after the
build, since only the artifacts we want are copied to the runtime
image. For reasons not investigated, attempting to remove the
local repository directory fails because the directory is in use
after the build.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/ac50375a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/ac50375a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/ac50375a

Branch: refs/heads/master
Commit: ac50375ad526ba6f1453ca10e32b6f393e6e486d
Parents: 5c07e4a
Author: Carl Harris <ce...@vt.edu>
Authored: Sat Oct 7 10:09:18 2017 -0400
Committer: Carl Harris <ce...@vt.edu>
Committed: Sat Oct 7 10:09:18 2017 -0400

----------------------------------------------------------------------
 guacamole-docker/bin/build-guacamole.sh | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/ac50375a/guacamole-docker/bin/build-guacamole.sh
----------------------------------------------------------------------
diff --git a/guacamole-docker/bin/build-guacamole.sh b/guacamole-docker/bin/build-guacamole.sh
index 4df6289..41e01b5 100755
--- a/guacamole-docker/bin/build-guacamole.sh
+++ b/guacamole-docker/bin/build-guacamole.sh
@@ -54,7 +54,6 @@ mkdir -p "$DESTINATION"
 
 cd "$BUILD_DIR"
 mvn package
-rm -Rf ~/.m2
 
 #
 # Copy guacamole.war to destination


[4/6] incubator-guacamole-client git commit: GUACAMOLE-408: revert changes to rat excludes

Posted by mj...@apache.org.
GUACAMOLE-408: revert changes to rat excludes

The excludes for rat should include everything in .gitignore, so
these explicit excludes are not needed.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/65c16ce9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/65c16ce9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/65c16ce9

Branch: refs/heads/master
Commit: 65c16ce90e0dd8500911435c5f0a6610370d1684
Parents: 70db9a4
Author: Carl Harris <ce...@vt.edu>
Authored: Sat Oct 7 20:31:24 2017 -0400
Committer: Carl Harris <ce...@vt.edu>
Committed: Sat Oct 7 20:31:24 2017 -0400

----------------------------------------------------------------------
 extensions/guacamole-auth-cas/pom.xml    | 1 -
 extensions/guacamole-auth-duo/pom.xml    | 1 -
 extensions/guacamole-auth-openid/pom.xml | 1 -
 guacamole/pom.xml                        | 1 -
 4 files changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/65c16ce9/extensions/guacamole-auth-cas/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-cas/pom.xml b/extensions/guacamole-auth-cas/pom.xml
index b517e6c..e76c50b 100644
--- a/extensions/guacamole-auth-cas/pom.xml
+++ b/extensions/guacamole-auth-cas/pom.xml
@@ -185,7 +185,6 @@
                         <exclude>**/*.json</exclude>
                         <exclude>src/licenses/**/*</exclude>
                         <exclude>src/main/resources/templates/*.html</exclude>
-                        <exclude>src/main/resources/generated/**</exclude>
                     </excludes>
                 </configuration>
 

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/65c16ce9/extensions/guacamole-auth-duo/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-duo/pom.xml b/extensions/guacamole-auth-duo/pom.xml
index 6f7037c..104b594 100644
--- a/extensions/guacamole-auth-duo/pom.xml
+++ b/extensions/guacamole-auth-duo/pom.xml
@@ -186,7 +186,6 @@
                         <exclude>**/*.json</exclude>
                         <exclude>src/licenses/**/*</exclude>
                         <exclude>src/main/resources/templates/*.html</exclude>
-                        <exclude>src/main/resources/generated/**</exclude>
                         <exclude>src/main/resources/lib/DuoWeb/**/*</exclude>
                         <exclude>src/main/java/com/duosecurity/duoweb/**/*</exclude>
                     </excludes>

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/65c16ce9/extensions/guacamole-auth-openid/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-openid/pom.xml b/extensions/guacamole-auth-openid/pom.xml
index e5cb9b6..4076998 100644
--- a/extensions/guacamole-auth-openid/pom.xml
+++ b/extensions/guacamole-auth-openid/pom.xml
@@ -185,7 +185,6 @@
                         <exclude>**/*.json</exclude>
                         <exclude>src/licenses/**/*</exclude>
                         <exclude>src/main/resources/templates/*.html</exclude>
-                        <exclude>src/main/resources/generated/**</exclude>
                     </excludes>
                 </configuration>
 

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/65c16ce9/guacamole/pom.xml
----------------------------------------------------------------------
diff --git a/guacamole/pom.xml b/guacamole/pom.xml
index 2afb743..4784cda 100644
--- a/guacamole/pom.xml
+++ b/guacamole/pom.xml
@@ -223,7 +223,6 @@
                 <configuration>
                     <excludes>
                         <exclude>src/main/webapp/app/*/templates/*.html</exclude>
-                        <exclude>src/main/webapp/generated/**</exclude>
                         <exclude>**/*.json</exclude>
                         <exclude>src/licenses/**/*</exclude>
                     </excludes>


[5/6] incubator-guacamole-client git commit: GUACAMOLE-408: don't exclude .gitignore in .dockerignore

Posted by mj...@apache.org.
GUACAMOLE-408: don't exclude .gitignore in .dockerignore

Because the .gitignore files are needed for configuring implicit
excludes for rat, .dockerignore must not exclude these files when
copying files into the image build context.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/e42a875f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/e42a875f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/e42a875f

Branch: refs/heads/master
Commit: e42a875f08096f8f130828ce133053457b5d8d4b
Parents: 65c16ce
Author: Carl Harris <ce...@vt.edu>
Authored: Sat Oct 7 20:35:20 2017 -0400
Committer: Carl Harris <ce...@vt.edu>
Committed: Sat Oct 7 20:35:20 2017 -0400

----------------------------------------------------------------------
 .dockerignore | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/e42a875f/.dockerignore
----------------------------------------------------------------------
diff --git a/.dockerignore b/.dockerignore
index cea1802..629ad03 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,6 +1,5 @@
 
 .git
-**/.gitignore
 
 **/*~
 **/target/


[3/6] incubator-guacamole-client git commit: GUACAMOLE-408: exclude generated HTML files from rat validation

Posted by mj...@apache.org.
GUACAMOLE-408: exclude generated HTML files from rat validation

When building inside of the Docker container, some files with
generated HTML are being validated by RAT and failing due to the
lack of a license header. When building outside of Docker, this
problem does not occur. Not sure why these paths don't fail when
building outside of the container, and I don't know enough about
the plugin that generates these files to understand why it behaves
differently inside of the container. Nonetheless, I think these
excludes seem reasonable.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/70db9a4c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/70db9a4c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/70db9a4c

Branch: refs/heads/master
Commit: 70db9a4c42418fdc520e4f3d6414a0e753a79266
Parents: ac50375
Author: Carl Harris <ce...@vt.edu>
Authored: Sat Oct 7 10:12:49 2017 -0400
Committer: Carl Harris <ce...@vt.edu>
Committed: Sat Oct 7 10:12:49 2017 -0400

----------------------------------------------------------------------
 extensions/guacamole-auth-cas/pom.xml    | 1 +
 extensions/guacamole-auth-duo/pom.xml    | 1 +
 extensions/guacamole-auth-openid/pom.xml | 1 +
 guacamole/pom.xml                        | 1 +
 4 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/70db9a4c/extensions/guacamole-auth-cas/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-cas/pom.xml b/extensions/guacamole-auth-cas/pom.xml
index e76c50b..b517e6c 100644
--- a/extensions/guacamole-auth-cas/pom.xml
+++ b/extensions/guacamole-auth-cas/pom.xml
@@ -185,6 +185,7 @@
                         <exclude>**/*.json</exclude>
                         <exclude>src/licenses/**/*</exclude>
                         <exclude>src/main/resources/templates/*.html</exclude>
+                        <exclude>src/main/resources/generated/**</exclude>
                     </excludes>
                 </configuration>
 

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/70db9a4c/extensions/guacamole-auth-duo/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-duo/pom.xml b/extensions/guacamole-auth-duo/pom.xml
index 104b594..6f7037c 100644
--- a/extensions/guacamole-auth-duo/pom.xml
+++ b/extensions/guacamole-auth-duo/pom.xml
@@ -186,6 +186,7 @@
                         <exclude>**/*.json</exclude>
                         <exclude>src/licenses/**/*</exclude>
                         <exclude>src/main/resources/templates/*.html</exclude>
+                        <exclude>src/main/resources/generated/**</exclude>
                         <exclude>src/main/resources/lib/DuoWeb/**/*</exclude>
                         <exclude>src/main/java/com/duosecurity/duoweb/**/*</exclude>
                     </excludes>

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/70db9a4c/extensions/guacamole-auth-openid/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-openid/pom.xml b/extensions/guacamole-auth-openid/pom.xml
index 4076998..e5cb9b6 100644
--- a/extensions/guacamole-auth-openid/pom.xml
+++ b/extensions/guacamole-auth-openid/pom.xml
@@ -185,6 +185,7 @@
                         <exclude>**/*.json</exclude>
                         <exclude>src/licenses/**/*</exclude>
                         <exclude>src/main/resources/templates/*.html</exclude>
+                        <exclude>src/main/resources/generated/**</exclude>
                     </excludes>
                 </configuration>
 

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/70db9a4c/guacamole/pom.xml
----------------------------------------------------------------------
diff --git a/guacamole/pom.xml b/guacamole/pom.xml
index 4784cda..2afb743 100644
--- a/guacamole/pom.xml
+++ b/guacamole/pom.xml
@@ -223,6 +223,7 @@
                 <configuration>
                     <excludes>
                         <exclude>src/main/webapp/app/*/templates/*.html</exclude>
+                        <exclude>src/main/webapp/generated/**</exclude>
                         <exclude>**/*.json</exclude>
                         <exclude>src/licenses/**/*</exclude>
                     </excludes>


[6/6] incubator-guacamole-client git commit: GUACAMOLE-408: Merge support for Docker multi-stage builds.

Posted by mj...@apache.org.
GUACAMOLE-408: Merge support for Docker multi-stage builds.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/b8abcd67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/b8abcd67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/b8abcd67

Branch: refs/heads/master
Commit: b8abcd6755f9d44bf9b32daaf240c1361811751d
Parents: 153996b e42a875
Author: Michael Jumper <mj...@apache.org>
Authored: Sat Oct 7 23:13:58 2017 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Sat Oct 7 23:13:58 2017 -0700

----------------------------------------------------------------------
 .dockerignore                           |  1 -
 Dockerfile                              | 37 +++++++++++++++++-----------
 guacamole-docker/bin/build-guacamole.sh |  1 -
 3 files changed, 22 insertions(+), 17 deletions(-)
----------------------------------------------------------------------