[DOCKER] ownCloud is here!


Recommended Posts

[glow=red,2,300]Docker container for ownCloud:[/glow]

 

https://registry.hub.docker.com/u/gfjardim/owncloud/

 

/usr/bin/docker run -d --name="ownCloud" --net="bridge" -e SUBJECT="/C=CT/ST=ST/L=CITY/O=ORGANIZATION/OU=UNIT/CN=myhome.com" -p 8000:8000/tcp -v "/path/to/your/owncloud/data":"/var/www/owncloud/data":rw -v "/etc/localtime":"/etc/localtime":ro gfjardim/owncloud

 

Change the SUBJECT variable to reflect your scenario.

 

PS: Please, do not change the port, because the Nginx configuration will redirect all non SSL requests to that port.

 

 

[glow=red,2,300]FAQ[/glow]

 

Q: Whenever I try and do an update to the owncloud docker, it tries to update my database and just gets stuck on the page that says: "This ownCloud instance is currently being updated, which may take a while. This page will refresh itself when the ownCloud instance is available again."

 

A: Please try to upgrade from the command line:

docker exec ownCloud sudo -u nobody -s /bin/bash -c "php /var/www/owncloud/occ upgrade"

  • Upvote 1
Link to comment
  • 2 weeks later...

Hi Guys,

 

When creating a docker for ownCoud im getting the following error when it started:

 

*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
No SSH host key available. Generating one...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
Creating SSH2 ED25519 key; this may take some time ...
invoke-rc.d: policy-rc.d denied execution of restart.
*** Running /etc/my_init.d/config.sh...
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 310
nginx: [emerg] BIO_new_file("/opt/server.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/opt/server.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)

 

the nginx error is repeated constantly from that point.

 

I edited the subject variable as noted in the OP, but still no go. Am I missing something simple?

 

Mark

Link to comment

Hi Guys,

 

When creating a docker for ownCoud im getting the following error when it started:

 

*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
No SSH host key available. Generating one...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
Creating SSH2 ED25519 key; this may take some time ...
invoke-rc.d: policy-rc.d denied execution of restart.
*** Running /etc/my_init.d/config.sh...
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 310
nginx: [emerg] BIO_new_file("/opt/server.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/opt/server.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)

 

the nginx error is repeated constantly from that point.

 

I edited the subject variable as noted in the OP, but still no go. Am I missing something simple?

 

Mark

What did you put in place of

/path/to/your/owncloud/data

Link to comment

I'm getting similar errors to billington.mark above --

 

root@Tower:/mnt/cache/appdata/owncloud# docker logs owncloud
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
No SSH host key available. Generating one...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
Creating SSH2 ED25519 key; this may take some time ...
invoke-rc.d: policy-rc.d denied execution of restart.
*** Running /etc/my_init.d/config.sh...
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 323
nginx: [emerg] BIO_new_file("/opt/server.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/opt/server.pem','r') error:200
6D080:BIO routines:BIO_new_file:no such file)

 

I tried deleting the config directory and restarting, but I had no such luck.

 

My command used to start this container was:

docker run -d --name="owncloud" --net="bridge" -e SUBJECT="/C=USA/ST=OR/L=SALEM/O=ORG/OU=UNIT/CN=troy.duckdns.org" -p 8000:8000/tcp -v "/mnt/cache/appdata/owncloud":"/var/www/owncloud/data":rw -v "/etc/localtime":"/etc/localtime":ro gfjardim/owncloud

Link to comment

Did you run through the Web setup?

 

I never looked at the logs, but the first time I installed it and ran through the web setup, after that it acted a bit odd.  I restarted the container and it has been running without issues for several days including syncing to a Mac client and IOS...

Link to comment

Did you run through the Web setup?

 

I never looked at the logs, but the first time I installed it and ran through the web setup, after that it acted a bit odd.  I restarted the container and it has been running without issues for several days including syncing to a Mac client and IOS...

Haven't been able to run through the websetup yet, because when I go to http://tower:8000 I just get a "This Webpage is not Available" message.  Does anyone have any other ideas on how I can troubleshoot this?

Link to comment

My issue was that i pointed the data folder at a folder that already existed. I created said folder through windows if that makes any difference?

 

Try and point the datapath at a folder that doesnt yet exist, like in your case '/mnt/cache/appdata/ownclouddata' and let it create the ownclouddata folder itself.

I can only assume if that works its something to do with the default permissions it assigns when you create folders and the user the docker service runs as doesnt have the necessary permissions to create subfolders\files somewhere.

 

Mark

Link to comment

Did you run through the Web setup?

 

I never looked at the logs, but the first time I installed it and ran through the web setup, after that it acted a bit odd.  I restarted the container and it has been running without issues for several days including syncing to a Mac client and IOS...

Haven't been able to run through the websetup yet, because when I go to http://tower:8000 I just get a "This Webpage is not Available" message.  Does anyone have any other ideas on how I can troubleshoot this?

 

I don't have a clue. Try HTTPS instead, or use your IP address instead.

Link to comment

Hmm, I changed "--net=bridge" to "--net=host" and now I'm able to connect to the owncloud server.  I had to do this with some docker containers, while others have worked fine in bridge mode.  I'm not enough of a networking guru to quite understand why one works and the other doesn't, so I guess I'll have to go look into that further.

 

Thanks for the help guys.

Link to comment

Hmm, I changed "--net=bridge" to "--net=host" and now I'm able to connect to the owncloud server.  I had to do this with some docker containers, while others have worked fine in bridge mode.  I'm not enough of a networking guru to quite understand why one works and the other doesn't, so I guess I'll have to go look into that further.

 

Thanks for the help guys.

fyi.

--net=bridge — The default action, that connects the container to the Docker bridge as described above.

 

--net=host — Tells Docker to skip placing the container inside of a separate network stack. In essence, this choice tells Docker to not containerize the container's networking! While container processes will still be confined to their own filesystem and process list and resource limits, a quick ip addr command will show you that, network-wise, they live “outside” in the main Docker host and have full access to its network interfaces. Note that this does not let the container reconfigure the host network stack — that would require --privileged=true — but it does let container processes open low-numbered ports like any other root process. It also allows the container to access local network services like D-bus. This can lead to processes in the container being able to do unexpected things like restart your computer. You should use this option with caution.

 

--net=container:NAME_or_ID — Tells Docker to put this container's processes inside of the network stack that has already been created inside of another container. The new container's processes will be confined to their own filesystem and process list and resource limits, but will share the same IP address and port numbers as the first container, and processes on the two containers will be able to connect to each other over the loopback interface.

 

--net=none — Tells Docker to put the container inside of its own network stack but not to take any steps to configure its network, leaving you free to build any of the custom configurations explored in the last few sections of this document.

Link to comment

Hmm, I changed "--net=bridge" to "--net=host" and now I'm able to connect to the owncloud server.  I had to do this with some docker containers, while others have worked fine in bridge mode.  I'm not enough of a networking guru to quite understand why one works and the other doesn't, so I guess I'll have to go look into that further.

 

Thanks for the help guys.

Are you using Xen?

 

Link to comment

Are you using Xen?

 

No, but I do have a bridge setup in my unraid network settings from when I WAS using Xen.  It's named "xenbr0".  Is that going to cause an issue?

 

That's it. I don't know why, but Docker tries to bind the containers virtual NICs on the main interface, in unRAID's case, it is eth0. The --net="host" command override this behavior, but it's not advised to run all containers this way because of possible port's conflicts.

 

Please, open your /boot/config/docker.cfg file, and in DOCKER_OPTS, after "--storage-driver=btrfs", add "--ip=YOUR.IP.ADDRESS".

 

My docker.cfg file's content, for an example, is this:

 

# Generated settings:
DOCKER_HOME="/mnt/cache/docker"
DOCKER_OPTS="--storage-driver=btrfs --ip=192.168.0.100 "
DOCKER_CONTAINERS="Couchpotato,CrashPlan,Deluge,MariaDB,ownCloud,SABnzbd,Sickbeard"

 

I'll make a thread to advise everyone about this.

Link to comment

Thanks gfjardim!  Changing the docker.cfg file did the trick and I can now access the Owncloud container via bridged mode.  You took that donate button down too soon  :P

 

It's still there! ::)

 

Ah, found it. Donation made.

 

Sent from my VS980 4G using Tapatalk

 

 

Link to comment

Thanks gfjardim!  Changing the docker.cfg file did the trick and I can now access the Owncloud container via bridged mode.  You took that donate button down too soon  :P

 

It's still there! ::)

 

Ah, found it. Donation made.

 

Sent from my VS980 4G using Tapatalk

Appreciated! Thanks a lot!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.