docker-owncloud

Simple to use Docker container with the latest ownCloud server release, complete with all the bells and whistles. This project is 100% transparent and trustable, every file in the resulting docker image is traceable and inspectable by following up the docker image depenancy tree which starts with my Arch Linux base image.

[Optional] Harden securityThis image comes complete with a self-signed ssl certificate already built in, so https access is ready to go out of the box. I've provided this pre-generated certificate for convienence and testing purposes only. It affords greatly reduced security since the "private" key is not actually private; anyone can download this image and inspect the keys and then decrypt your ownCloud traffic. To make the ssl connection to this ownCloud server secure, you can (A) provide your own (secret) ssl certificate files or (B) use the script provided here to generate new, self-signed certificate files. Both will provide equal security but (B) will result in browser warnings whenever somone visits your site since the web browser will likely not trust your self-generated and self-signed keys.

For option (A) (providing your own SSL cert files):Assuming you have your own server.crt and server.key files in a directory ~/sslCert on your host machine, then run (also on your host machine):

The image includes a bash script (/etc/httpd/conf/genSSLKey.sh) that generates new ssl cert files on command (and overwrites the public ones included in this image). You can use this script to regenerate a new SSL key anytime on the fly. you only need to restart the apache server after regenerating your keys. After starting the docker image as described above, run the following commands:

The SUBJECT variable is actually optional here, but I put it in there to show how to change the generated certificate to your liking, especially important if you don't want your certificate to be for localhostFor either (A) or (B), remember to turn on the option to force https connections in the ownCloud admin settings page to take advantage of your hardened security UPDATE: starting in version 8.1, the OwnCloud devs have decided to remove this useful feature from their software by accepting the following PR: https://github.com/owncloud/core/pull/14651 which removes the "Enforce HTTPS" tickbox from the settings page.

Updating to the latest container

NOTE: Docker 1.7 is scheduled for release on 06/16/2015. This will bring with it named containers which will greatly simplify & improve container data management. Stay tuned for a new upgrade strategy.

From time-to-time I'll update the continer to add new features or fix bugs or update to a new ownCloud server release, so you might want to update the ownCloud container you're using.

Run docker pull l3iggs/owncloud

If the above command returns "Status: Image is up to date" then you've got the latest image and you're done. Otherwise:

Then run docker rm oc <-- WARNING: this may cause catastrophic data loss. It WILL delete anything stored inside the container. If you wish to retain important things like data files and configuration files after running this command, then see the wiki on Github for instructions on how to store these things outside of the container.