Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XWiki] Update SHA1 after recent fixes #2686

Merged
merged 3 commits into from
Feb 27, 2017
Merged

Conversation

vmassol
Copy link
Contributor

@vmassol vmassol commented Feb 24, 2017

Fixed: XDOCKER-10, XDOCKER-11, XDOCKER-12, XDOCKER-13, XDOCKER-15 + add new tags

…ER-12, XDOCKER-13, XDOCKER-15) and add new tags
@tianon
Copy link
Member

tianon commented Feb 24, 2017

diff --git a/xwiki_8-mysql-tomcat/Dockerfile b/xwiki_latest/Dockerfile
similarity index 97%
rename from xwiki_8-mysql-tomcat/Dockerfile
rename to xwiki_latest/Dockerfile
index cc46e5a..c72d1cc 100644
--- a/xwiki_8-mysql-tomcat/Dockerfile
+++ b/xwiki_latest/Dockerfile
@@ -37,6 +37,9 @@ RUN apt-get update && \
 # Configure the XWiki permanent directory
 ENV XWIKI_VERSION=8.4.4
 ENV XWIKI_URL_PREFIX "http://maven.xwiki.org/releases/org/xwiki/enterprise/xwiki-enterprise-web/${XWIKI_VERSION}"
+# Note: To compute the sha256, download the binary and issue:
+# - Unix: sha256sum <binary name>
+# - Mac: shasum --algorithm 25 <binary name>
 ENV XWIKI_DOWNLOAD_SHA256 b414edb4527e3d8b27c40a8c3f2f09423980de7963207b7dc89da71d14e7fb23
 RUN rm -rf /usr/local/tomcat/webapps/* && \
   mkdir -p /usr/local/tomcat/temp && \
diff --git a/xwiki_8-mysql-tomcat/tomcat/setenv.sh b/xwiki_latest/tomcat/setenv.sh
similarity index 100%
rename from xwiki_8-mysql-tomcat/tomcat/setenv.sh
rename to xwiki_latest/tomcat/setenv.sh
diff --git a/xwiki_8-mysql-tomcat/xwiki/docker-entrypoint.sh b/xwiki_latest/xwiki/docker-entrypoint.sh
similarity index 92%
rename from xwiki_8-mysql-tomcat/xwiki/docker-entrypoint.sh
rename to xwiki_latest/xwiki/docker-entrypoint.sh
index de51cef..586f4ab 100755
--- a/xwiki_8-mysql-tomcat/xwiki/docker-entrypoint.sh
+++ b/xwiki_latest/xwiki/docker-entrypoint.sh
@@ -49,6 +49,8 @@ function configure() {
   echo 'Configuring XWiki...'
   sed -i "s/replacemysqluser/${MYSQL_USER:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
   sed -i "s/replacemysqlpassword/${MYSQL_PASSWORD:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
+  sed -i "s/replacemysqlcontainername/${DB_CONTAINER_NAME:-db}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
+  sed -i "s/replacemysqldatabase/${MYSQL_DATABASE:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
 
   echo '  Using filesystem-based attachments...'
   xwiki_set_cfg 'xwiki.store.attachment.hint' 'file'
diff --git a/xwiki_mysql-tomcat/xwiki/hibernate.cfg.xml b/xwiki_latest/xwiki/hibernate.cfg.xml
similarity index 97%
rename from xwiki_mysql-tomcat/xwiki/hibernate.cfg.xml
rename to xwiki_latest/xwiki/hibernate.cfg.xml
index 6411837..bdd419b 100644
--- a/xwiki_mysql-tomcat/xwiki/hibernate.cfg.xml
+++ b/xwiki_latest/xwiki/hibernate.cfg.xml
@@ -84,7 +84,7 @@
            - if you want the main wiki database to be different than "xwiki"
              you will also have to set the property xwiki.db in xwiki.cfg file
     -->
-    <property name="connection.url">jdbc:mysql://db/${MYSQL_DATABASE:-xwiki}?useSSL=false</property>
+    <property name="connection.url">jdbc:mysql://replacemysqlcontainername/replacemysqldatabase?useSSL=false</property>
     <property name="connection.username">replacemysqluser</property>
     <property name="connection.password">replacemysqlpassword</property>
     <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
diff --git a/xwiki_mysql-tomcat/Dockerfile b/xwiki_stable/Dockerfile
similarity index 94%
rename from xwiki_mysql-tomcat/Dockerfile
rename to xwiki_stable/Dockerfile
index cc46e5a..461c994 100644
--- a/xwiki_mysql-tomcat/Dockerfile
+++ b/xwiki_stable/Dockerfile
@@ -35,9 +35,12 @@ RUN apt-get update && \
 # Install XWiki as the ROOT webapp context in Tomcat
 # Create the Tomcat temporary directory
 # Configure the XWiki permanent directory
-ENV XWIKI_VERSION=8.4.4
+ENV XWIKI_VERSION=9.0
 ENV XWIKI_URL_PREFIX "http://maven.xwiki.org/releases/org/xwiki/enterprise/xwiki-enterprise-web/${XWIKI_VERSION}"
-ENV XWIKI_DOWNLOAD_SHA256 b414edb4527e3d8b27c40a8c3f2f09423980de7963207b7dc89da71d14e7fb23
+# Note: To compute the sha256, download the binary and issue:
+# - Unix: sha256sum <binary name>
+# - Mac: shasum --algorithm 25 <binary name>
+ENV XWIKI_DOWNLOAD_SHA256 faaca2aa1ade07448be944feb39db22131accfe82658463abfd55f93f859cc25
 RUN rm -rf /usr/local/tomcat/webapps/* && \
   mkdir -p /usr/local/tomcat/temp && \
   mkdir -p /usr/local/xwiki/data && \
diff --git a/xwiki_mysql-tomcat/tomcat/setenv.sh b/xwiki_stable/tomcat/setenv.sh
similarity index 100%
rename from xwiki_mysql-tomcat/tomcat/setenv.sh
rename to xwiki_stable/tomcat/setenv.sh
diff --git a/xwiki_mysql-tomcat/xwiki/docker-entrypoint.sh b/xwiki_stable/xwiki/docker-entrypoint.sh
similarity index 92%
rename from xwiki_mysql-tomcat/xwiki/docker-entrypoint.sh
rename to xwiki_stable/xwiki/docker-entrypoint.sh
index de51cef..586f4ab 100755
--- a/xwiki_mysql-tomcat/xwiki/docker-entrypoint.sh
+++ b/xwiki_stable/xwiki/docker-entrypoint.sh
@@ -49,6 +49,8 @@ function configure() {
   echo 'Configuring XWiki...'
   sed -i "s/replacemysqluser/${MYSQL_USER:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
   sed -i "s/replacemysqlpassword/${MYSQL_PASSWORD:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
+  sed -i "s/replacemysqlcontainername/${DB_CONTAINER_NAME:-db}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
+  sed -i "s/replacemysqldatabase/${MYSQL_DATABASE:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
 
   echo '  Using filesystem-based attachments...'
   xwiki_set_cfg 'xwiki.store.attachment.hint' 'file'
diff --git a/xwiki_8-mysql-tomcat/xwiki/hibernate.cfg.xml b/xwiki_stable/xwiki/hibernate.cfg.xml
similarity index 97%
rename from xwiki_8-mysql-tomcat/xwiki/hibernate.cfg.xml
rename to xwiki_stable/xwiki/hibernate.cfg.xml
index 6411837..bdd419b 100644
--- a/xwiki_8-mysql-tomcat/xwiki/hibernate.cfg.xml
+++ b/xwiki_stable/xwiki/hibernate.cfg.xml
@@ -84,7 +84,7 @@
            - if you want the main wiki database to be different than "xwiki"
              you will also have to set the property xwiki.db in xwiki.cfg file
     -->
-    <property name="connection.url">jdbc:mysql://db/${MYSQL_DATABASE:-xwiki}?useSSL=false</property>
+    <property name="connection.url">jdbc:mysql://replacemysqlcontainername/replacemysqldatabase?useSSL=false</property>
     <property name="connection.username">replacemysqluser</property>
     <property name="connection.password">replacemysqlpassword</property>
     <property name="connection.driver_class">com.mysql.jdbc.Driver</property>

@tianon
Copy link
Member

tianon commented Feb 24, 2017

I think DB_CONTAINER_NAME is a bit of a misleading name for that environment variable, since it's really the hostname for MySQL, which just happens to be the container name in most cases (--network-alias can change that, for example, or running the database completely external to Docker but still running XWiki in Docker), right?

@vmassol
Copy link
Contributor Author

vmassol commented Feb 25, 2017

@tianon I think you're right. I'll change that to DB_HOST tomorrow and update this PR (and submit a new doc PR too since I saw that the one I submitted has been merged already). Thanks for the suggestion. I'm impressed by your reviews, they're thorough and to the point.

@tianon
Copy link
Member

tianon commented Feb 25, 2017

It's not merged, just approved. 👍

@vmassol
Copy link
Contributor Author

vmassol commented Feb 25, 2017

@tianon Done, I've updated both PRs (this one and the doc one). Thanks

@yosifkit
Copy link
Member

diff --git a/xwiki_8-mysql-tomcat/Dockerfile b/xwiki_latest/Dockerfile
similarity index 82%
rename from xwiki_8-mysql-tomcat/Dockerfile
rename to xwiki_latest/Dockerfile
index cc46e5a..b840ce1 100644
--- a/xwiki_8-mysql-tomcat/Dockerfile
+++ b/xwiki_latest/Dockerfile
@@ -37,6 +37,9 @@ RUN apt-get update && \
 # Configure the XWiki permanent directory
 ENV XWIKI_VERSION=8.4.4
 ENV XWIKI_URL_PREFIX "http://maven.xwiki.org/releases/org/xwiki/enterprise/xwiki-enterprise-web/${XWIKI_VERSION}"
+# Note: To compute the sha256, download the binary and issue:
+# - Unix: sha256sum <binary name>
+# - Mac: shasum --algorithm 25 <binary name>
 ENV XWIKI_DOWNLOAD_SHA256 b414edb4527e3d8b27c40a8c3f2f09423980de7963207b7dc89da71d14e7fb23
 RUN rm -rf /usr/local/tomcat/webapps/* && \
   mkdir -p /usr/local/tomcat/temp && \
@@ -46,14 +49,13 @@ RUN rm -rf /usr/local/tomcat/webapps/* && \
   unzip -d /usr/local/tomcat/webapps/ROOT xwiki.war && \
   rm -f xwiki.war
 
-# Copy the MySQL JDBC driver in the XWiki webapp
+# Copy the JDBC driver in the XWiki webapp
 RUN cp /usr/share/java/mysql-connector-java-*.jar /usr/local/tomcat/webapps/ROOT/WEB-INF/lib/
 
 # Configure Tomcat. For example set the memory for the Tomcat JVM since the default value is too small for XWiki
 COPY tomcat/setenv.sh /usr/local/tomcat/bin/
 
 # Setup the XWiki Hibernate configuration
-ENV MYSQL_DATABASE=xwiki
 COPY xwiki/hibernate.cfg.xml /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
 
 # Set a specific distribution id in XWiki for this docker packaging.
@@ -73,18 +75,21 @@ VOLUME /usr/local/xwiki
 # the container that will be created out of the image. Namely the user can override some environment variables with
 #   docker run -e "var1=val1" -e "var2=val2" ...
 # The supported environment variables that can be overridden are:
-# - MYSQL_USER: the name of the user configured for XWiki in the DB. Default is "xwiki". This is used to configure
-#               xwiki's hibernate.cfg.xml file.
-# - MYSQL_PASSWORD: the password for the user configured for XWiki in the DB. Default is "xwiki". This is used to
-#                   configure xwiki's hibernate.cfg.xml file.
+# - DB_USER: the name of the user configured for XWiki in the DB. Default is "xwiki". This is used to configure
+#            xwiki's hibernate.cfg.xml file.
+# - DB_PASSWORD: the password for the user configured for XWiki in the DB. Default is "xwiki". This is used to
+#                configure xwiki's hibernate.cfg.xml file.
+# - DB_DATABASE: the name of the database to use. Default is "xwiki". This is used to configure xwiki's
+#                hibernate.cfg.xml file.
+# - DB_HOST: The name of the host (or docker container) containing the database. Default is "db". This is used to
+#            configure xwiki's hibernate.cfg.xml file.
+
 # Example:
-#   docker run -it -e "MYSQL_USER=xwiki" -e "MYSQL_PASSWORD=xwiki" <imagename>
+#   docker run -it -e "DB_USER=xwiki" -e "DB_PASSWORD=xwiki" <imagename>
 
 # Starts XWiki by starting Tomcat. All options passed to "docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]"
 # are also passed to docker-entrypoint.sh. If "xwiki" is passed then XWiki will be configured the first time the
 # container executes and Tomcat will be started. If some other parameter is passed then it'll be executed to comply
 # with best practices defined at https://github.com/docker-library/official-images#consistency.
-ENV MYSQL_USER=xwiki \
-    MYSQL_PASSWORD=xwiki
 ENTRYPOINT ["docker-entrypoint.sh"]
 CMD ["xwiki"]
diff --git a/xwiki_8-mysql-tomcat/tomcat/setenv.sh b/xwiki_latest/tomcat/setenv.sh
similarity index 100%
rename from xwiki_8-mysql-tomcat/tomcat/setenv.sh
rename to xwiki_latest/tomcat/setenv.sh
diff --git a/xwiki_8-mysql-tomcat/xwiki/docker-entrypoint.sh b/xwiki_latest/xwiki/docker-entrypoint.sh
similarity index 88%
rename from xwiki_8-mysql-tomcat/xwiki/docker-entrypoint.sh
rename to xwiki_latest/xwiki/docker-entrypoint.sh
index de51cef..753c104 100755
--- a/xwiki_8-mysql-tomcat/xwiki/docker-entrypoint.sh
+++ b/xwiki_latest/xwiki/docker-entrypoint.sh
@@ -47,8 +47,10 @@ function xwiki_set_properties() {
 
 function configure() {
   echo 'Configuring XWiki...'
-  sed -i "s/replacemysqluser/${MYSQL_USER:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
-  sed -i "s/replacemysqlpassword/${MYSQL_PASSWORD:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
+  sed -i "s/replaceuser/${DB_USER:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
+  sed -i "s/replacepassword/${DB_PASSWORD:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
+  sed -i "s/replacecontainer/${DB_HOST:-db}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
+  sed -i "s/replacedatabase/${DB_DATABASE:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
 
   echo '  Using filesystem-based attachments...'
   xwiki_set_cfg 'xwiki.store.attachment.hint' 'file'
diff --git a/xwiki_mysql-tomcat/xwiki/hibernate.cfg.xml b/xwiki_latest/xwiki/hibernate.cfg.xml
similarity index 93%
rename from xwiki_mysql-tomcat/xwiki/hibernate.cfg.xml
rename to xwiki_latest/xwiki/hibernate.cfg.xml
index 6411837..cf66897 100644
--- a/xwiki_mysql-tomcat/xwiki/hibernate.cfg.xml
+++ b/xwiki_latest/xwiki/hibernate.cfg.xml
@@ -79,14 +79,13 @@
     -->
 
     <!-- MySQL configuration.
-         Uncomment if you want to use MySQL and comment out other database configurations.
          Notes:
            - if you want the main wiki database to be different than "xwiki"
              you will also have to set the property xwiki.db in xwiki.cfg file
     -->
-    <property name="connection.url">jdbc:mysql://db/${MYSQL_DATABASE:-xwiki}?useSSL=false</property>
-    <property name="connection.username">replacemysqluser</property>
-    <property name="connection.password">replacemysqlpassword</property>
+    <property name="connection.url">jdbc:mysql://replacecontainer/replacedatabase?useSSL=false</property>
+    <property name="connection.username">replaceuser</property>
+    <property name="connection.password">replacepassword</property>
     <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
     <property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
     <property name="dbcp.poolPreparedStatements">true</property>
diff --git a/xwiki_mysql-tomcat/Dockerfile b/xwiki_stable/Dockerfile
similarity index 79%
rename from xwiki_mysql-tomcat/Dockerfile
rename to xwiki_stable/Dockerfile
index cc46e5a..48f3143 100644
--- a/xwiki_mysql-tomcat/Dockerfile
+++ b/xwiki_stable/Dockerfile
@@ -35,9 +35,12 @@ RUN apt-get update && \
 # Install XWiki as the ROOT webapp context in Tomcat
 # Create the Tomcat temporary directory
 # Configure the XWiki permanent directory
-ENV XWIKI_VERSION=8.4.4
+ENV XWIKI_VERSION=9.0
 ENV XWIKI_URL_PREFIX "http://maven.xwiki.org/releases/org/xwiki/enterprise/xwiki-enterprise-web/${XWIKI_VERSION}"
-ENV XWIKI_DOWNLOAD_SHA256 b414edb4527e3d8b27c40a8c3f2f09423980de7963207b7dc89da71d14e7fb23
+# Note: To compute the sha256, download the binary and issue:
+# - Unix: sha256sum <binary name>
+# - Mac: shasum --algorithm 25 <binary name>
+ENV XWIKI_DOWNLOAD_SHA256 faaca2aa1ade07448be944feb39db22131accfe82658463abfd55f93f859cc25
 RUN rm -rf /usr/local/tomcat/webapps/* && \
   mkdir -p /usr/local/tomcat/temp && \
   mkdir -p /usr/local/xwiki/data && \
@@ -46,14 +49,13 @@ RUN rm -rf /usr/local/tomcat/webapps/* && \
   unzip -d /usr/local/tomcat/webapps/ROOT xwiki.war && \
   rm -f xwiki.war
 
-# Copy the MySQL JDBC driver in the XWiki webapp
+# Copy the JDBC driver in the XWiki webapp
 RUN cp /usr/share/java/mysql-connector-java-*.jar /usr/local/tomcat/webapps/ROOT/WEB-INF/lib/
 
 # Configure Tomcat. For example set the memory for the Tomcat JVM since the default value is too small for XWiki
 COPY tomcat/setenv.sh /usr/local/tomcat/bin/
 
 # Setup the XWiki Hibernate configuration
-ENV MYSQL_DATABASE=xwiki
 COPY xwiki/hibernate.cfg.xml /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
 
 # Set a specific distribution id in XWiki for this docker packaging.
@@ -73,18 +75,21 @@ VOLUME /usr/local/xwiki
 # the container that will be created out of the image. Namely the user can override some environment variables with
 #   docker run -e "var1=val1" -e "var2=val2" ...
 # The supported environment variables that can be overridden are:
-# - MYSQL_USER: the name of the user configured for XWiki in the DB. Default is "xwiki". This is used to configure
-#               xwiki's hibernate.cfg.xml file.
-# - MYSQL_PASSWORD: the password for the user configured for XWiki in the DB. Default is "xwiki". This is used to
-#                   configure xwiki's hibernate.cfg.xml file.
+# - DB_USER: the name of the user configured for XWiki in the DB. Default is "xwiki". This is used to configure
+#            xwiki's hibernate.cfg.xml file.
+# - DB_PASSWORD: the password for the user configured for XWiki in the DB. Default is "xwiki". This is used to
+#                configure xwiki's hibernate.cfg.xml file.
+# - DB_DATABASE: the name of the database to use. Default is "xwiki". This is used to configure xwiki's
+#                hibernate.cfg.xml file.
+# - DB_HOST: The name of the host (or docker container) containing the database. Default is "db". This is used to
+#            configure xwiki's hibernate.cfg.xml file.
+
 # Example:
-#   docker run -it -e "MYSQL_USER=xwiki" -e "MYSQL_PASSWORD=xwiki" <imagename>
+#   docker run -it -e "DB_USER=xwiki" -e "DB_PASSWORD=xwiki" <imagename>
 
 # Starts XWiki by starting Tomcat. All options passed to "docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]"
 # are also passed to docker-entrypoint.sh. If "xwiki" is passed then XWiki will be configured the first time the
 # container executes and Tomcat will be started. If some other parameter is passed then it'll be executed to comply
 # with best practices defined at https://github.com/docker-library/official-images#consistency.
-ENV MYSQL_USER=xwiki \
-    MYSQL_PASSWORD=xwiki
 ENTRYPOINT ["docker-entrypoint.sh"]
 CMD ["xwiki"]
diff --git a/xwiki_mysql-tomcat/tomcat/setenv.sh b/xwiki_stable/tomcat/setenv.sh
similarity index 100%
rename from xwiki_mysql-tomcat/tomcat/setenv.sh
rename to xwiki_stable/tomcat/setenv.sh
diff --git a/xwiki_mysql-tomcat/xwiki/docker-entrypoint.sh b/xwiki_stable/xwiki/docker-entrypoint.sh
similarity index 88%
rename from xwiki_mysql-tomcat/xwiki/docker-entrypoint.sh
rename to xwiki_stable/xwiki/docker-entrypoint.sh
index de51cef..753c104 100755
--- a/xwiki_mysql-tomcat/xwiki/docker-entrypoint.sh
+++ b/xwiki_stable/xwiki/docker-entrypoint.sh
@@ -47,8 +47,10 @@ function xwiki_set_properties() {
 
 function configure() {
   echo 'Configuring XWiki...'
-  sed -i "s/replacemysqluser/${MYSQL_USER:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
-  sed -i "s/replacemysqlpassword/${MYSQL_PASSWORD:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
+  sed -i "s/replaceuser/${DB_USER:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
+  sed -i "s/replacepassword/${DB_PASSWORD:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
+  sed -i "s/replacecontainer/${DB_HOST:-db}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
+  sed -i "s/replacedatabase/${DB_DATABASE:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml
 
   echo '  Using filesystem-based attachments...'
   xwiki_set_cfg 'xwiki.store.attachment.hint' 'file'
diff --git a/xwiki_8-mysql-tomcat/xwiki/hibernate.cfg.xml b/xwiki_stable/xwiki/hibernate.cfg.xml
similarity index 93%
rename from xwiki_8-mysql-tomcat/xwiki/hibernate.cfg.xml
rename to xwiki_stable/xwiki/hibernate.cfg.xml
index 6411837..cf66897 100644
--- a/xwiki_8-mysql-tomcat/xwiki/hibernate.cfg.xml
+++ b/xwiki_stable/xwiki/hibernate.cfg.xml
@@ -79,14 +79,13 @@
     -->
 
     <!-- MySQL configuration.
-         Uncomment if you want to use MySQL and comment out other database configurations.
          Notes:
            - if you want the main wiki database to be different than "xwiki"
              you will also have to set the property xwiki.db in xwiki.cfg file
     -->
-    <property name="connection.url">jdbc:mysql://db/${MYSQL_DATABASE:-xwiki}?useSSL=false</property>
-    <property name="connection.username">replacemysqluser</property>
-    <property name="connection.password">replacemysqlpassword</property>
+    <property name="connection.url">jdbc:mysql://replacecontainer/replacedatabase?useSSL=false</property>
+    <property name="connection.username">replaceuser</property>
+    <property name="connection.password">replacepassword</property>
     <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
     <property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
     <property name="dbcp.poolPreparedStatements">true</property>

@yosifkit
Copy link
Member

Build test of #2686; 4cef6b3 (xwiki):

$ bashbrew build xwiki:8
Building bashbrew/cache:6a0f5041f0b1074af1ea07ccdd4f1d71899e3801ba7f16cf828dfda0b52137d5 (xwiki:8)
Tagging xwiki:8
Tagging xwiki:8.4
Tagging xwiki:8.4.4
Tagging xwiki:8-mysql-tomcat
Tagging xwiki:mysql-tomcat
Tagging xwiki:lts-mysql-tomcat
Tagging xwiki:lts
Tagging xwiki:latest

$ test/run.sh xwiki:8
testing xwiki:8
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build xwiki:9
Building bashbrew/cache:5e24dd6c4038f2400dce989003141ab8e4c65ecd1ebda696f2bdb857c35fa32d (xwiki:9)
Tagging xwiki:9
Tagging xwiki:9.0
Tagging xwiki:9-mysql-tomcat
Tagging xwiki:stable-mysql-tomcat
Tagging xwiki:stable

$ test/run.sh xwiki:9
testing xwiki:9
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed

@yosifkit yosifkit requested a review from tianon February 27, 2017 20:52
@tianon tianon merged commit b632144 into docker-library:master Feb 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants