Public | Automated Build

Last pushed: 11 days ago
Short Description
Reasonably configurable Docker image for the latest ownCloud (9.0.0) - Debian 8, NGINX and PHP-FPM
Full Description

ownCloud Docker Image

Deploy ownCloud easily.

Setup

The quickest way to get it up is:

docker run -d -p 80:80 pschmitt/owncloud

Then go to http://localhost/ and log in as admin, password: changeme.

Environment variables

  • DB_TYPE: Either sqlite, mysql, pgsql or oci. Default: sqlite
  • DB_HOST: Database host. Default: localhost
  • DB_NAME: Database name. Default: owncloud
  • DB_USER: Database user. Default: owncloud
  • DB_PASS: Database password. Default: owncloud
  • DB_TABLE_PREFIX: Prefix for all database tables. Default: oc_
  • ADMIN_USER: Username of the admin. Default: admin
  • ADMIN_PASS: Password of the admin account. Default: changeme
  • DATA_DIR: ownCloud data dir. Default: /var/www/owncloud/data
  • HTTPS_ENABLED: Whether to enable HTTPS (true or false). Default: false
  • TIMEZONE: Timezone. Default: UTC

Database setup

The image currently supports linking against a MySQL or PostgreSQL container.
This container MUST be named db for this to work.

Volumes

  • /var/www/owncloud/apps: ownCloud's plugin/apps directory
  • /var/www/owncloud/config: ownCloud's config directory
  • /var/www/owncloud/data: ownCloud's data directory
  • /etc/ssl/certs/owncloud.crt: SSL certificate. Required if HTTPS_ENABLED is
    true.
  • /etc/ssl/private/owncloud.key: SSL private key. Required if HTTPS_ENABLED
    is true.
  • /var/log/nginx: Nginx logs

Systemd service file

[Unit]
Description=Dockerized ownCloud
After=docker.service docker-postgres.service
Requires=docker.service docker-postgres.service

[Service]
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/docker kill owncloud
ExecStartPre=-/usr/bin/docker rm owncloud
ExecStartPre=/usr/bin/docker pull pschmitt/owncloud
ExecStart=/usr/bin/docker run --name=owncloud -h owncloud.example.com \
  -p 80:80 -p 443:443 \
  --link postgres:db \
  -e 'DB_NAME=owncloud' \
  -e 'DB_USER=owncloud' \
  -e 'DB_PASS=PassWord' \
  -e 'ADMIN_USER=admin' \
  -e 'ADMIN_PASS=admin' \
  -e 'TIMEZONE=Europe/Berlin' \
  -e 'HTTPS_ENABLED=true' \
  -v /srv/docker/owncloud/apps:/var/www/owncloud/apps \
  -v /srv/docker/owncloud/config:/var/www/owncloud/config \
  -v /srv/docker/owncloud/data:/var/www/owncloud/data \
  -v /srv/docker/owncloud/owncloud.crt:/etc/ssl/certs/owncloud.crt \
  -v /srv/docker/owncloud/owncloud.key:/etc/ssl/certs/owncloud.key \
  pschmitt/owncloud

[Install]
Alias=owncloud.service
WantedBy=multi-user.target

Run occ commands

Provided owncloud is the name of your container:

docker exec -it owncloud occ help
Docker Pull Command
Owner
pschmitt
Source Repository

Comments (5)
nefariusmag
10 months ago

Hi, in first start button add in trust domain not work((

rockstor
2 years ago

Hi pschmitt, Thanks for a very good image. the volume layout and env configurability in your image make it better than other more popular owncloud images on the hub. I've been using your image as the default for Rockstor NAS. One problem our users face happens is when you update the image. Is it possible to also tag the latest by the owncloud version? for example, currently the latest image uses 8.2.2, but it would be nice if it's identified by a specific tag like 8.2.2 or 8.2.2-1 or whatever.

alexlawrence
2 years ago

Hi,

great image. Thank you for the work! Works like a charm.

I have some minor issues/questions:

  1. I try to enable the Gallery App but it does not work. Other apps like Calendar and Documents can be enabled. Do you know the reason why?
  2. When creating a backup, do I need to backup the "/var/www/owncloud/apps" volume?
  3. I have a nginx server running outside the docker container which does SSL termination. This causes the owncloud installation to say that SSL is not enabled. Do you see any issues with that?

Regards

vikas027
2 years ago

Hello dariananjuhal,

To change the upload limit, please change below parameters in /etc/php.ini according to your environment.

post_max_size = 2G
upload_max_filesize = 1G
memory_limit = 512M

Regards.

dariananjuhal
2 years ago

Hey thx for sharing, its a good container.

But I have problems if I wanna upload files bigger than ~2Mb. It doesnt work from the ubuntu client neither from the browser.

Thats why I guess its a server configuration issue.
I started a phpinfo() which means it works for 512Mb but it doesnt.

Does anyone have the same issue?