From 7564941661485c1e4cc3ffc1d69cc14cc6095b66 Mon Sep 17 00:00:00 2001
From: Vincent Massol <vincent@massol.net>
Date: Mon, 30 Jan 2017 11:25:12 +0100
Subject: [PATCH] [Misc] Remove CHMOD (which was not required anyway since the
 exec bit was already set in git)

---
 xwiki-mysql-tomcat/Dockerfile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xwiki-mysql-tomcat/Dockerfile b/xwiki-mysql-tomcat/Dockerfile
index 3ba9ac4..6a979d2 100644
--- a/xwiki-mysql-tomcat/Dockerfile
+++ b/xwiki-mysql-tomcat/Dockerfile
@@ -65,12 +65,12 @@ RUN sed "s/<id>org.xwiki.enterprise:xwiki-enterprise-web/<id>org.xwiki.enterpris
   mv /usr/local/tomcat/webapps/ROOT/META-INF/extension2.xed /usr/local/tomcat/webapps/ROOT/META-INF/extension.xed
 
 # Add scripts required to make changes to XWiki configuration files at execution time
+# Note: we don't run CHMOD since 1) it's not required since the executabe bit is already set in git and 2) running
+# CHMOD after a COPY will sometimes fail, depending on different host-specific factors (especially on AUFS).
 COPY xwiki/xwiki-config-replace.sh /usr/local/bin/xwiki-config-replace.sh
 COPY xwiki/xwiki-set-cfg /usr/local/bin/xwiki-set-cfg
 COPY xwiki/xwiki-set-properties /usr/local/bin/xwiki-set-properties
 COPY xwiki/start_xwiki.sh /usr/local/bin/start_xwiki.sh
-RUN chmod 0755 /usr/local/bin/xwiki-config-replace.sh /usr/local/bin/xwiki-set-cfg /usr/local/bin/xwiki-set-properties \
-  /usr/local/bin/start_xwiki.sh
 
 # Make the XWiki directory (the permanent directory is included in it) persist on the host (so that it's not recreated
 # across runs)
-- 
GitLab