gfjardim Posted June 25, 2014 Share Posted June 25, 2014 [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" 1 Quote Link to comment
thegizzard Posted July 6, 2014 Share Posted July 6, 2014 Patiently waiting! almost. Quote Link to comment
gfjardim Posted July 6, 2014 Author Share Posted July 6, 2014 Patiently waiting! almost. Done! Quote Link to comment
nacat78 Posted July 6, 2014 Share Posted July 6, 2014 Patiently waiting! almost. Done! Awesome job - its working great Quote Link to comment
billington.mark Posted July 7, 2014 Share Posted July 7, 2014 Loving Docker so far. If anything im finding out apps like this exist! Im primarily a windows server guy so finding all these cool open source apps that have previously been out of scope for unraid (unless i was being blind in the plugin forums) is really quite cool. Quote Link to comment
thegizzard Posted July 7, 2014 Share Posted July 7, 2014 Docker Rocks!!! I feel like I am on much more control of unraid. Everything is cleaner and faster now as far as I can tell. Sent from my SM-N900V using Xparent BlueTapatalk 2 Quote Link to comment
billington.mark Posted July 8, 2014 Share Posted July 8, 2014 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 Quote Link to comment
trurl Posted July 8, 2014 Share Posted July 8, 2014 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 Quote Link to comment
billington.mark Posted July 8, 2014 Share Posted July 8, 2014 /mnt/user/DockerAppData/owncloud Cleared the content of the folder and re-downloaded everything and im in business. Quote Link to comment
botez Posted July 9, 2014 Share Posted July 9, 2014 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 Quote Link to comment
jphipps Posted July 9, 2014 Share Posted July 9, 2014 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... Quote Link to comment
botez Posted July 9, 2014 Share Posted July 9, 2014 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? Quote Link to comment
billington.mark Posted July 9, 2014 Share Posted July 9, 2014 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 Quote Link to comment
gfjardim Posted July 9, 2014 Author Share Posted July 9, 2014 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. Quote Link to comment
jphipps Posted July 9, 2014 Share Posted July 9, 2014 That was going to be my next suggestion.. Sent from my iPhone using Tapatalk Quote Link to comment
botez Posted July 9, 2014 Share Posted July 9, 2014 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. Quote Link to comment
eroz Posted July 9, 2014 Share Posted July 9, 2014 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. Quote Link to comment
gfjardim Posted July 9, 2014 Author Share Posted July 9, 2014 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? Quote Link to comment
botez Posted July 9, 2014 Share Posted July 9, 2014 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? Quote Link to comment
gfjardim Posted July 9, 2014 Author Share Posted July 9, 2014 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. Quote Link to comment
botez Posted July 9, 2014 Share Posted July 9, 2014 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 Quote Link to comment
gfjardim Posted July 9, 2014 Author Share Posted July 9, 2014 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 It's still there! Quote Link to comment
botez Posted July 10, 2014 Share Posted July 10, 2014 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 It's still there! Ah, found it. Donation made. Sent from my VS980 4G using Tapatalk Quote Link to comment
gfjardim Posted July 10, 2014 Author Share Posted July 10, 2014 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 It's still there! Ah, found it. Donation made. Sent from my VS980 4G using Tapatalk Appreciated! Thanks a lot! Quote Link to comment
Dimtar Posted July 17, 2014 Share Posted July 17, 2014 I disabled the bridge in my unRaid network settings, the OwnCloud docker doesn't work in either host or bridge mode though? Assuming after install I goto https://192.168.1.2:8000/owncloud ?? Quote Link to comment
Recommended Posts
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.