diff --git a/nextcloud/build/Dockerfile b/nextcloud/build/Dockerfile new file mode 100644 index 00000000..04711996 --- /dev/null +++ b/nextcloud/build/Dockerfile @@ -0,0 +1,13 @@ +## This is a cache of nextcloud image +FROM docker.0k.io/nextcloud:1.0.0 + + +## +## What is following is only to patch nextcloud to remove +## some database name checks +## + +COPY database-accept-dots.patch /tmp/ + +RUN cd /usr/src/nextcloud && \ + patch -p1 < /tmp/database-accept-dots.patch \ No newline at end of file diff --git a/nextcloud/build/database-accept-dots.patch b/nextcloud/build/database-accept-dots.patch new file mode 100644 index 00000000..b25e9f5b --- /dev/null +++ b/nextcloud/build/database-accept-dots.patch @@ -0,0 +1,14 @@ +diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php +index 0cbfecf..a821a2e 100644 +--- a/lib/private/Setup/AbstractDatabase.php ++++ b/lib/private/Setup/AbstractDatabase.php +@@ -72,9 +72,6 @@ abstract class AbstractDatabase { + } elseif (empty($config['dbname'])) { + $errors[] = $this->trans->t("%s enter the database name.", [$this->dbprettyname]); + } +- if(substr_count($config['dbname'], '.') >= 1) { +- $errors[] = $this->trans->t("%s you may not use dots in the database name", array($this->dbprettyname)); +- } + return $errors; + } + diff --git a/nextcloud/metadata.yml b/nextcloud/metadata.yml index 1449eb61..a622ae1e 100644 --- a/nextcloud/metadata.yml +++ b/nextcloud/metadata.yml @@ -1,4 +1,3 @@ -docker-image: docker.0k.io/nextcloud:1.0.0 data-resources: - /var/www/html - /var/lib/nextcloud/data