2016-05-30 19:43:23 +02:00
..
2016-05-01 13:33:03 +02:00
2016-04-30 12:57:18 +02:00
2016-05-30 19:43:23 +02:00
2016-04-30 12:57:18 +02:00
2016-05-12 00:16:33 +02:00
2016-05-12 00:44:22 +02:00
2016-04-30 12:57:18 +02:00

wonderfall/owncloud

Features

  • Based on Alpine Linux (edge).
  • Ready to update : data and apps persistence.
  • nginx is the webserver.
  • PHP 7 version is used.
  • OPCache (opcode cache) is configured to provide better performances.
  • APCu (data store) is installed, so you can benefit from memory caching.
  • system cron is already configured (you can disable AJAX cron).
  • MySQL/MariaDB compatibility (server not built-in).
  • Secure installation, it verifies both integrity and authenticity (sha256sum && gpg).
  • UID/GID flexibility, you won't bother about permissions.

This image is meant to be used behind a secure reverse proxy.

Tags

  • latest, 9.0 : ownCloud 9.0.x (actual version : 9.0.1).

If you want some security, versioning with tags should be available since 9.0 (e.g. the next tags will be 9.1, 9.2, etc. major updates as you can notice). I do not make tags for minor updates, like 8.2.1, 8.2.2, 8.2.x, since there are only bugfixes and security patches, which are strongly recommended.

Build-time variables

  • OWNCLOUD_VERSION : version of ownCloud
  • APCU_VERSION : version of apcu pecl ext
  • APCUBC_VERSION : version of apcu_bc pecl ext
  • GPG_owncloud : fingerprint of the signing key

Environment variables

  • UID : owncloud user id (default : 991)
  • GID : owncloud group id (default : 991)

Volumes

  • /data : owncloud data (your files!).
  • /config : configuration files (contains config.php).
  • /apps2 : owncloud downloaded apps (like calendar, contacts, etc.).

Hey, you should add the following code to your config.php in order to enable apps persistence :

  "apps_paths" => array (
      0 => array (
              "path"     => "/owncloud/apps",
              "url"      => "/apps",
              "writable" => false,
      ),
      1 => array (
              "path"     => "/apps2",
              "url"      => "/apps2",
              "writable" => true,
      ),
  ),

About the database

You have to use an external database container, it is thus allowing better security and less complexity. I suggest you to use MariaDB, which is a reliable database server. For instance, you can use the official mariadb image available as an automated build that you can find on Docker Hub. Since sqlite is supected by ownCloud to cause some troubles with sync clients, sqlite databases are not suported.

Once runned!

Go to your ownCloud instance, change /ocwww/data to /data (recommended), and fill in all the fields to configure your database. Don't forget to type a strong password. You should also avoid to name your admin account "admin".

Configure

When you mount /config, you don't really mount /ocwww/owncloud/config. /config should contain config.php, although this is not the one actually used by ownCloud. However, each time you restart the container, /config/config.php overwrites /ocwww/config/config.php. Before that, /ocwww/config/config.php is copied as /config/config.php.bkp, so you can easily revert changes.

Now, ownCloud should be 100% functionnal. APCu can be enabled if you set it correctly in the config.php file (see further). system cron is already active. You should switch from AJAX cron to cron (system cron) in the admin pannel. By the way, I highly recommend encryption! My buid is fully-compatible with the encryption module.

config.php parameters can be found here and there This is espacially useful when you're using a reverse proxy, and/or if you'd like to keep your 3rd-party plugins across updates (you should use the /apps volume to do that). READ THE DOCUMENTATION.

How do I update?

Just pull the newer image, and recreate the container. As you may know, backups are highly recommended (don't fear that, Docker just makes things a lot easier!), and even if it's boring, do it, do it, do it! The version directive in your /config/config.php is automatically updated with the one eventually generated by ownCloud after an upgrade.

Enable APCU

Add this line to your config.php :

  'memcache.local' => '\OC\Memcache\APCu',

Docker Compose (example)

reverse:
  ...
  links:
    - owncloud:owncloud
  ...

owncloud:
  image: wonderfall/owncloud:9.0
  links:
    - db_owncloud:db_owncloud
  environment:
    - UID=1000
    - GID=1000
  volumes:
    - /mnt/owncloud/data:/data
    - /mnt/owncloud/config:/config
    - /mnt/owncloud/apps:/apps2

db_owncloud:
  image: mariadb:10
  volumes:
    - /mnt/owncloud/db:/var/lib/mysql
  environment:
    - MYSQL_ROOT_PASSWORD=supersecretpassword
    - MYSQL_DATABASE=owncloud
    - MYSQL_USER=owncloud
    - MYSQL_PASSWORD=supersecretpassword

Port

  • 80 (cf Reverse Proxy).

Reverse proxy

https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration Note that you don't have to add any headers since they're already included in the container (you avoid useless warnings from owncloud). It is strongly recommended to use ownCloud through an encrypted connection (HTTPS).

Enjoy!

Go to your admin pannel, and check the Security & setup warnings section. If you see "All checks passed", then you can congratulate yourself!