+2

[ 2.0 ] Install Ubooquity 2 in docker

zer 7 years ago updated by pes65 7 years ago 35

Hi there,


For all docker addicts, I wrote a docker file and docker-compose one to install Ubooquity v2.

They are accessible here : https://github.com/zerpex/ubooquity-docker


With default parameters, Ubooquity is available through :

http://your-ip:55603

Admin page : http://your-ip:55604/admin


Enjoy :)

Are you sure about those default ports? Those numbers are not the defaults in your script on github.

You're right, it was the good ports when I made the post, but since I "normilized" them to make it simplier.. just forgot to update here.


Good ports are :

2202 for Ubooquity

2502 for admin


Sorry !

+1

As cromignon doesn't seems to reply; I made my own docker repository :

https://hub.docker.com/r/zerpex/ubooquity-docker/


So you can pull the image directly from :

docker pull zerpex/ubooquity-docker

thanks it works fine on qnap

great, all feed back are welcomes :)

hello

You will update with release 2.0.2 ?

Thanks

yes all is good


Thanks

Just updated image to 2.0.2.

regards

Hello.


I also have Ubooquity on a Docker. But I made a volume where I put ubooquity.jar and all his files. So I can update easily by copying the new file in the folder.

That a different point of view, your solution need the user to do the update manualy. Mine need users to wait after me to update my image, but for them its fully automated.


Both have advantages and drawbacks.

Since I'm a Docker user myself, I wanted to see how you sorted this out. Dockerfile looks great.


Could you not automate the download of my theme? I use the forum for distribution so I can sort out issues. Also by downloading it into the container on Docker hub, it won't update when I do.


Thanks

Hi,


I wrote it for a test, but because of the way docker share folders between the host and the container, the theme don't work like that (it is not displayed at all). I never troubleshooted that part of the script, so don't worry, no one is able to use it directly from my image ;)


Of course, no problem for me to remove these part :)


Regards

Setup the 2.0.2 beta via Qnap Container Station/Docker. Creates container and imports the zerpex/ubooquity-docker:latest image w/o any errors. However, admittedly a noob to Docker, I simply cannot figure out how to pull up the admin console.


The command field in the docker container panel shows:


 java -Dfile.encoding=UTF-8 -jar -Xmx512m /ubooquity/Ubooquity.jar -workdir /config -headless -libraryport 22


The install details:

20170530 17:06:47 [main] INFO  com.ubooquity.Ubooquity - Running with the following parameters - headless: true, libraryport: 2202, adminport: 
2, remoteadmin: true, host: null, debug: false, execdir: /config


In the browser I have tried:


ip:2203

ip:2203/admin

ip:2202

ip:2202/admin

ip:2305

ip:2305/admin


Allways get:

This site can’t be reached. 192.168.x.xxx refused to connect.


I have done an apache restart, no help there.


It's gotta be something simple, but I sure ain't seeing it yet!


Thanks,


Monty



Hi,


Try : 

2502/admin for console

2202 for app


Regards,

z.

Same error message on ip:2502/admin, as well as the app access at ip:2202

Can you please post result of the following commands ?


docker ps

docker logs

In the "terminal" window, I typed docker ps:


First I see a popup window: Process exited with code 126. Click ok, then


1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

rpc error: code = 2 desc = "oci runtime error: exec failed: exec: \"docker\": executable file not found in $PATH"

for docker logs same popup window error then:


rpc error: code = 2 desc = "oci runtime error: exec failed: exec: \"docker\": executable file not found in $PATH"   


Here is the startup log in the console:


20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - Running with the following parameters - headless: true, libraryport: 2202, adminport: 2502, remoteadmin: true, host: null, debug: false, execdir: /config                                                                                                                                                           
20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - #############################                                                                                                                                                                                                                                                                                       
20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - #     Starting Ubooquity    #                                                                                                                                                                                                                                                                                       
20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - #############################                                                                                                                                                                                                                                                                                       
20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - Java version: 1.8.0_111-internal                                                                                                                                                                                                                                                                                    
20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - Java vendor: Oracle Corporation                                                                                                                                                                                                                                                                                     
20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - Max heap size available: 455 MB                                                                                                                                                                                                                                                                                     
20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - OS name: Linux                                                                                                                                                                                                                                                                                                      
20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - OS version: 4.2.8                                                                                                                                                                                                                                                                                                   
20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - OS architecture: amd64                                                                                                                                                                                                                                                                                              
20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - Loading local version info                                                                                                                                                                                                                                                                                          
20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - Ubooquity 2.0.2 built on 2017-04-24 at 20:52                                                                                                                                                                                                                                                                        
20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - Creating application folders                                                                                                                                                                                                                                                                                        
20170530 18:19:53 [main] INFO  com.ubooquity.Ubooquity - Loading preferences                                                                                                                                                                                                                                                                                                 
20170530 18:19:54 [main] INFO  org.eclipse.jetty.util.log - Logging initialized @3888ms to org.eclipse.jetty.util.log.Slf4jLog                                                                                                                                                                                                                                               
20170530 18:19:54 [main] INFO  com.ubooquity.b - Starting internal server...                                                                                                                                                                                                                                                                                                 
20170530 18:19:54 [main] INFO  com.ubooquity.b - Reverse proxy prefix is not activated                                                                                                                                                                                                                                                                                       
20170530 18:19:54 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Scanning books directories                                                                                                                                                                                                                                                                            
20170530 18:19:54 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Finished scanning books directories, populating folders content cache                                                                                                                                                                                                                                 
20170530 18:19:54 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Books folder content cache populated                                                                                                                                                                                                                                                                  
20170530 18:19:54 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Scanning comics directories                                                                                                                                                                                                                                                                           
20170530 18:19:54 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Finished scanning comics directories, populating folders content cache                                                                                                                                                                                                                                
20170530 18:19:54 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Comics folder content cache populated                                                                                                                                                                                                                                                                 
20170530 18:19:54 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Comics statistics: [total: 0, added or updated: 0, removed: 0]                                                                                                                                                                                                                                        
20170530 18:19:54 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Books statistics: [total: 0, added or updated: 0, removed: 0]                                                                                                                                                                                                                                         
20170530 18:19:54 [main] INFO  org.eclipse.jetty.server.Server - jetty-9.4.0.v20161208                                                                                                                                                                                                                                                                                       
20170530 18:19:54 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@4082ba93{/,null,AVAILABLE,@admin}                                                                                                                                                                                                                                      
20170530 18:19:54 [main] INFO  o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@17fc391b{/,null,AVAILABLE,@library}                                                                                                                                                                                                                                    
20170530 18:19:54 [main] INFO  o.e.jetty.server.AbstractConnector - Started library@7c639a2d{HTTP/1.1,[http/1.1]}{0.0.0.0:2202}                                                                                                                                                                                                                                              
20170530 18:19:54 [main] INFO  o.e.jetty.server.AbstractConnector - Started admin@5c80cf32{HTTP/1.1,[http/1.1]}{0.0.0.0:2502}                                                                                                                                                                                                                                                
20170530 18:19:54 [main] INFO  org.eclipse.jetty.server.Server - Started @4236ms                                                                                                                                                                                                                                                                                             
20170530 18:19:54 [main] INFO  com.ubooquity.b - Internal server started. Listening on port 2202 (library) and 2502 (admin)                                                                                                                                                                                                                                                  
Tyep Q then ENTER to exit                                                                                                                                                                                                                                                                                                                                                    
20170530 18:19:55 [Timer-0] INFO  com.ubooquity.Ubooquity - Checking latest available Ubooquity version from website                                                                                                                                                                                                                                                         
20170530 18:19:56 [Timer-0] INFO  com.ubooquity.Ubooquity - Latest version available: 1.10.1 - Current version: 2.0.2                                                                                                                                                                                                                                                        
                                                                                                       

Ok, figured the errors out...no need to put in "docker", just "ps" :


ps =

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

PID   USER     TIME   COMMAND                                                                                                                                                                         
    1 root       0:06 java -Dfile.encoding=UTF-8 -jar -Xmx512m /ubooquity/Ubooq                                                                                                                       
   47 root       0:00 ps 

logs or log = Same error message as before.


found "docker.log" (qnap buries this really deep, LoL) Anyway here are the last few entries:

------------------

time="2017-05-30T11:39:01.499475681-07:00" level=error msg="Error running exec in container: rpc error: code = 2 desc = \"oci runtime error: exec failed: exec: \\\"log\\\": executable file not found in $PATH\"\n"
time="2017-05-30T11:39:01.499547525-07:00" level=error msg="Handler for POST /v1.23/exec/8d364bb0d2921a6b9b0b32408ba2466c6076d77bee50b020e968e64f9d3b6e13/start returned error: rpc error: code = 2 desc = \"oci runtime error: exec failed: exec: \\\"log\\\": executable file not found in $PATH\""
2017/05/30 11:39:01 http: response.WriteHeader on hijacked connection
2017/05/30 11:39:01 http: response.Write on hijacked connection
time="2017-05-30T11:39:02.194611397-07:00" level=error msg="Handler for POST /v1.23/exec/8d364bb0d2921a6b9b0b32408ba2466c6076d77bee50b020e968e64f9d3b6e13/resize returned error: rpc error: code = 2 desc = \"containerd: processs not found for container\""
time="2017-05-30T11:40:20.796687825-07:00" level=error msg="Handler for POST /v1.23/exec/00285edf0bbb706ddd996aa038af8a07be2e13d6bacf7f31075cf3d933ced65e/resize returned error: rpc error: code = 2 desc = \"containerd: processs not found for container\""
[/share/Web] #

----------------------

"hijacked connection" does not sound good, so am going to delete the docker/image, reboot the nas, and try a fresh reinstall.


Humm, I must admit that I don't understand with these logs !

I am no Qnap specialist and don't know if there are subtilities :/

Maybe @kenji can help ?

Just an FYI.


Instead of putting in ip:2202, I simply clicked on the link in the Docker control panel, ie


hxxp://192.168.x.xxx:32770/

That gives me the Ubooquity logo page, but black screen with:


Sorry, you are not authorized to access any file on this server


If I then put in hxxp://192.168.x.xxx:32770/admin,


it gives me a simple page with:

Remote server administration is not activated.

So it appears the mapping from that port to 2202/2502, etc is not working for one reason or another.


Would it help to try to activate that? If so, how?


Thanks!




MontyJ

did you solve the issue?

Hi,


I am sorry, but I have no way to reproduce as I don't have a QNAP. So it's impossible for me to test this and try to solve the issue.


I don't even know how QNAP manage docker.
How does it works ? Do you have an interface ? a docker-compose ? do you run it directly through a "docker run" command ?


Regards,

zer

Hi,

thanks for reply

I am sorry too :-(

I am a newbie! so I just used the "app" installed from Qnap App Center named "container station" and it creates the docker where I download your package "zerpex/ubooquity-docker"

That's it!


In the meantime I discovered that my port 2202 and 2502 are not opened !!! I did the port-forwarding in my router but they are still down :-(

I need to check with my ISP .....


According to this tutorial : https://www.qnap.com/en/how-to/tutorial/article/how-to-use-container-station
QNAP makes a default run and bind the ports by itself.

Anyway, you should find the binded ports on container station's interface :

(see the "URL" part under the "Running" status).


Regards,

zer

+1

when you create docker, on "host" put 2202 and 2502, by default is empty, so qnap take another port




Don't forget map your drive


in my case, i have share folder on qnap : 

-  comics  : all my CBR files (/share/comics)

- Ubooquity/config : i can acces via SMB for config ubooquity file, and not connect by ssh)



Hi folks!!!!

You have opened my mind on this!

Thanks so much

I realized that I didn't configure out anything during the installation of the docker.... a poor man!


Now is working perfectly:

Just install using the docker container of zerpex, set the advance setting as suggested by Kenji et voilà nothing else. QNAP takes care of everything about ports and so on

Only thing to be done to complete the installation, address the port 2202 to the NAS in the  router to access remotely and for dynamic IP set up DDNS always in the router (I use no-IP service)

Now I am happy man because I learnt a lot and I can store, read and download everywhere to any devices my ebooks and comics!


thanks again!

Yes, it seems the mapping is not the default one. You used the docker-compose I made ?


Anyway, you should be able to find correct ports with "docker ps". This command show the mapping !

zerpex,


I followed the bouncing ball in the qnap container station Docker setup. I selected your version of Uboo and it downloaded the image and created the container. Again, this is my first install using this qnap setup.


I don't see a way to alter much of anything, which is probably because I an not familiar with it. When it created the container, it did have a entry for 'command' prior to the install, but I have no idea what to put in there so left it blank.


It looks like it is possible to get an image manually and then have the Container Station create the docker for it, but still see no way for customization...I am learning, but slowly, LoL.


For example you say enter "docker ps". I tried that in the "command" window and it simply errors out. Is there some other way? I ssh into the nas, but "docker" is not an executable in the path.


Hopefully someone with a successful install using the qnap container station and Uboo will be able to give me some pointers...


monty

Hi,


OK, so QNAP has it's own interface to manage containers installation. I don't know how it works, so I can't help, sorry :/

Actually, to install a container on a linux based server, U can use a file that is a kind of receipe used to set up all option, so you can specify the ports you want to use.


sorry.

+1

Hi,


I'm a bit late (didn't noticed that update, sorry), but I just updated my image to Ubooquity 2.1.0.


If someone fork my repository in order to do this kind of updates, don't hesitate to make a pull request so that I'll be noticed and merge the pull :)


Regards,

zerpex

I meant to come back and make a pull request, just forgot. Sorry!

np ;)


I am working on a dev branch where Ubooquity installation is made at the run process and installs the latest version at this moment.

This should solve upgrade issue as users will only have to down and up their container to get latest Ubooquity.