tjw1184 / iipimageserver

Preconfigured IIPImage Server with Display Clients OpenSeaDragon, IIPZoom and IIPMooViewer
0 stars 0 forks source link

Installation does not work correctly #1

Open catweis opened 1 year ago

catweis commented 1 year ago

Thank you for your docker version of a tile server with a viewer. Unfortunately, following your installation instructions, the docker seems not to work. Checking by docker container ls, there is no active docker. Furthermore, existing images can not be shown by e.g. http://server:port/openseadragon.php?image=image1.tif. There is only a "this site can not be reached" error.

ianhinder commented 2 months ago

The problem is that the startup.sh script uses an unusual way of waiting forever. It runs the command "bash", which is intended to "hold command prompt open". However, this will only work if bash is run interactively, i.e. with a tty allocated. So a quick solution is to make sure to run the container with the "-it" option:

docker run -it -p 80:80 -v <path to data>:/pics tjw1184/iipimageserver

I don't know if you can do this with docker create. This will give you a "bash" prompt, which you can close when you don't need the server anymore.

Rather than starting apache as a service in the background using an init script, which I think is only happening because of the service apache2 restart command in startup.sh, and then running bash under "tini", it would make more sense to just run the apache2 process from startup.sh, as is done in the official ubuntu apache image: https://hub.docker.com/r/ubuntu/apache2, https://github.com/dhanugupta/docker-apache-ubuntu/blob/06cafb4888cdebf6ba52d94d5cb9f697adfe6832/Dockerfile#L35. In fact, it would probably make sense to base the iipimageserver image off the ubuntu/apache2 image, so all this was done automatically.