Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

docker-owncloud

Arch Linux based Docker container including owncloud (as of this writing, version 8.0.0) running on apache with sqlite, mariadb and php-xcache.

Usage

  1. Install docker
  2. Download and start the owncloud server instance
    docker run --name oc -p 80:80 -p 443:443 -d l3iggs/owncloud
  3. Access the docker setup page
    Point your browser to:
    http://localhost/owncloud
    or
    https://localhost/owncloud
    and follow the on-onscreen instructions to finish the owncloud server setup.
  4. [Optional] Change your owncloud data storage location
    On the Owncloud initial setup page, after setting up your admin account, instead of clicking the "Finish Setup" button, you can click "Storage & database" instead. You can change the data folder location here (note that this is a path inside the docker container, not on your host machine).
    It's likely desirable for owncloud's data storage to be placed in a persistant storage location outside the docker container, on the host's file system for example. Let's imagine you wish to store your docker files in a folder ~/ocfiles on the host's file system. Then insert the following into the docker startup command (from step 2. above) between run and --name:
    -v ~/ocfiles:/usr/share/webapps/owncloud/data
    UID 33 or GID 33 (http in the container image) must have r/w permissions for ~/ocfiles on the host system. Generally, it's enough to do:
    chmod -R 770 ~/ocfiles; sudo chgrp -R 33 ~/ocfiles
    Read this if you run into permissions issues in the container.
  5. [Optional] Change your owncloud config storage location
    Similar to the above change, this allows the owncloud config directory to be stored outside of the docker container.
    -v ~/occonfig:/etc/webapps/owncloud/config
    chmod -R g+rw ~/occonfig; sudo chgrp -R 33 ~/occonfig
  6. [Optional] Setup owncloud to use mariadb instead of the default sqlite database
    On the Owncloud initial setup page, after setting up your admin account, instead of clicking the "Finish Setup" button, you can click "Storage & database" instead. Then click the "MySQL/MariaDB" enter 'root' in the Database user field and leave the password field blank. Choose any name you like for the Database name field. The Database host filed should be left as 'localhost' if you'd like to use the mariadb server provided in this docker image.
  7. [Optional] Use your own ssl certificate
    This image comes with a self-generated ssl certificate and so you'll get browser warnings when you access owncloud via https. You can replace these self signed certificates with your own, properly generated cert files.
    Assuming you have server.crt and server.key files in a directory ~/sslCert on the host machine:
    sudo chown -R root ~/sslCert; sudo chgrp -R root ~/sslCert
    sudo chmod 400 ~/sslCert/server.key
    You can then add -v ~/sslCert:/https to the docker run command line to use your ssl certificate files.
  8. [Optional] Stop the docker-owncloud server instance
    docker stop oc
  9. [Optional] Delete the docker-owncloud server instance (after stopping it)
    docker rm oc
  10. Profit.
Docker Pull Command
Owner
teodoc
Source Repository

Comments (0)