1
0
Fork 0
Go to file
2016-04-23 03:55:59 +02:00
.dockerignore Update ignored files 2015-05-18 10:22:55 +02:00
.gitignore Switch to git 2015-04-23 23:27:16 +02:00
crontab Add configuration for system cron 2016-04-23 02:07:27 +02:00
Dockerfile Add the crontab file into the container 2016-04-23 03:00:51 +02:00
LICENSE Add license 2015-02-16 01:15:42 +01:00
owncloud.conf Switch to upstream source tarball 2015-02-15 19:21:49 +01:00
README.md Add a note about linking ca-certificates 2015-07-17 18:46:52 +02:00
start.sh Start also cron 2016-04-23 03:55:59 +02:00

docker-owncloud

Docker i386 image with ownCloud and nginx. It uses SQLite as database because it is intended for personal use only (one user). It also uses two docker volumes, one for config and one for data.

Build

    docker build -t 'yourusername/owncloud' .

Run

    docker run -d -p 127.0.0.1:9000:80 --name owncloud \
    -v /srv/owncloud/config:/srv/owncloud/config \
    -v /srv/owncloud/data:/srv/owncloud/data eriol/owncloud

For owncloud >= 8.1.0 you need, on the host, to link certificates bundle inside config volume:

    ln -s /etc/ssl/certs/ca-certificates.crt /srv/owncloud/config/ca-bundle.crt

You should use nginx on the host as reverse proxy:

    server {
       listen 80;
       server_name owncloud.example.org;
       return 301 https://$host$request_uri;
    }

    server {
       listen 443;
       server_name owncloud.example.com;

       ssl on;
       ssl_certificate /etc/ssl/private/example_org.cert;
       ssl_certificate_key /etc/ssl/private/example_org.key;

       location / {
          proxy_pass http://127.0.0.1:9000;
          proxy_redirect off;
          proxy_buffering off;
          proxy_set_header    Host    $host;
          proxy_set_header    X-Real-IP   $remote_addr;
          proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
       }
    }