Mercurial > hg > digilib
comparison build/docker/README.md @ 1712:f63a888473e3
Merge pull request #19 from robcast/dockerize
README for Docker hub and configuration options for container.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 18 Feb 2019 18:34:26 +0100 |
parents | 439aefc7a6c9 |
children |
comparison
equal
deleted
inserted
replaced
1703:367ae3da4f20 | 1712:f63a888473e3 |
---|---|
1 # digilib | |
2 | |
3  | |
4 | |
5 A Docker container for the [digilib image server](https://robcast.github.io/digilib/). | |
6 | |
7 digilib is a [IIIF API](https://iiif.io) compliant image server written in Java: | |
8 * Documentation: https://robcast.github.io/digilib/ | |
9 * Issues: https://github.com/robcast/digilib/issues | |
10 * Source code: https://github.com/robcast/digilib | |
11 | |
12 ## Supported tags | |
13 | |
14 * **release-x.y.z**: Tagged release builds. | |
15 * **snapshot**: unstable daily builds from the `master` branch. | |
16 | |
17 ## Dependencies | |
18 | |
19 The digilib runtime image builds on the [tomcat:9-jre11](https://hub.docker.com/_/tomcat) image. | |
20 | |
21 ## How to use this image | |
22 | |
23 Quick try-out using built-in images: | |
24 ``` | |
25 docker run --rm -p 8080:8080 robcast/digilib | |
26 ``` | |
27 Then open https://localhost:8080/digilib/digilib.html in your browser. | |
28 | |
29 To use your own images in the directory `/your/image/path` on your host system: | |
30 ``` | |
31 docker run --rm \ | |
32 -p 8080:8080 \ | |
33 --name digilib \ | |
34 -e BASEDIR_LIST="/var/lib/images" \ | |
35 -v /your/image/path:/var/lib/images \ | |
36 robcast/digilib | |
37 ``` | |
38 | |
39 ## Available parameters for the container | |
40 | |
41 You can set the values of the most important digilib configuration parameters as environment variables | |
42 using the `-e` option of `docker run`. For more information check the | |
43 [digilib-config documentation](https://robcast.github.io/digilib/digilib-config.html). | |
44 | |
45 * BASEDIR_LIST: The list of directories where images are searched. | |
46 | |
47 * DEFAULT_QUALITY: The default interpolation quality (0: do not use interpolation (worst), | |
48 1: use linear interpolation, | |
49 2: use bilinear interpolation and blur-before-scale (best, default)) | |
50 | |
51 * MAX_IMAGE_SIZE: The maximum size of delivered images as pixel area, 40000 means up to 200x200 or 100x400, | |
52 0 (default) means no limit. | |
53 | |
54 * SENDFILE_ALLOWED: Is sending whole image files with mo=file allowed (default: "true")? | |
55 | |
56 * WORKER_THREADS: Number of parallel working threads (default: 2). | |
57 | |
58 * MAX_WAITING_THREADS: Maximum number of waiting requests in queue (default: 20). | |
59 | |
60 * IIIF_PREFIX: The URL prefix (after Scaler) that leads to the IIIF API (default: "IIIF") | |
61 | |
62 ## Using your own `digilib-config.xml` | |
63 | |
64 If you need more control over your [digilib configuration](https://robcast.github.io/digilib/digilib-config.html) | |
65 then you can supply your own `digilib-config.xml` file by mounting it | |
66 to `/usr/local/tomcat/webapps/digilib/WEB-INF/digilib-config.xml` in the container: | |
67 ``` | |
68 docker run --rm \ | |
69 -p 8080:8080 \ | |
70 --name digilib \ | |
71 -v digilib-config.xml:/usr/local/tomcat/webapps/digilib/WEB-INF/digilib-config.xml | |
72 -v /your/image/path:/var/lib/images \ | |
73 robcast/digilib | |
74 ``` | |
75 | |
76 Note: when you use your own config file you can not use the predefined parameters described above. | |
77 | |
78 ## Building your own container image | |
79 | |
80 You can build your own digilib container image from the digilib sources: | |
81 ``` | |
82 git clone https://github.com/robcast/digilib.git | |
83 cd digilib | |
84 docker build -f build/docker/Dockerfile -t mydigilib:latest . | |
85 ``` | |
86 | |
87 You can supply additional options to Maven during the build process using the `MVM_ARGS` build parameter: | |
88 ``` | |
89 docker build -f build/docker/Dockerfile -t mydigilib:latest --build-arg MVN_ARGS="-Piiif-presentation" . | |
90 ``` | |
91 See the [digilib build documentation](https://robcast.github.io/digilib/build-maven.html) for more information. |