|
1 | 1 | # calibre
|
2 | 2 |
|
3 |
| -This contains the docker file and all necessary files to build a docker container for calibre |
| 3 | +This contains the docker file and all necessary files to build a docker container for calibre. |
| 4 | + |
| 5 | +Calibre (https://calibre-ebook.com) is probably the best e-book management system out there. This docker container will run the |
| 6 | +server portion only. |
4 | 7 |
|
5 | 8 | ### Preperation
|
| 9 | + |
6 | 10 | Before running the container, you'll need to have the following directories predefined on the container host:
|
7 | 11 | ```sh
|
8 | 12 | library
|
9 | 13 | addbooks
|
10 | 14 | ```
|
11 |
| -The library directory will hold your books & database. addbooks will be used to add books to your library on a periodic basis. I used: |
| 15 | +The library directory will hold your books & database. addbooks will be used to add books to your library. I used: |
12 | 16 | ```sh
|
13 |
| -/data/library |
14 |
| -/data/addbooks |
| 17 | +/home/books/library |
| 18 | +/home/books/addbooks |
15 | 19 | ```
|
16 |
| -for the instructions below. Just make sure you create it prior to starting the container. |
| 20 | +for the instructions below. Just make sure you create them prior to starting the container. |
| 21 | + |
17 | 22 | ### To run the container:
|
| 23 | + |
| 24 | +```sh |
| 25 | +docker run -d --name=calibre -v /home/books:/data:Z -p 8080:8080 bcleonard/calibre |
| 26 | +``` |
| 27 | + |
| 28 | +### To access Calibre: |
| 29 | + |
18 | 30 | ```sh
|
19 |
| -docker run -v /data:/data -p 8080:8080 bcleonard/calibre |
| 31 | +http://<docker_host>:8080 |
20 | 32 | ```
|
21 |
| -### Notes: |
| 33 | + |
| 34 | +### To add books to the library. |
| 35 | + |
| 36 | +First add your books to /home/books/addbooks, one book (all formats) per directory. Then run the following command: |
| 37 | +```sh |
| 38 | +docker exec calibre /scripts/add-books.sh |
| 39 | +``` |
| 40 | +All the books in /home/books/addbooks will be added to the library, removed from the /home/books/addbooks directory and calibre notified. |
| 41 | + |
| 42 | +### Notes/Caveats/Issues: |
| 43 | + |
| 44 | +1. Previous versions of the container used to automatically run the add-books.sh script hourly via cron. In an effect to reduce the image size and with the available of the docker exec command, that functionality has been removed. |
| 45 | +2. I recommend running the add-scripts.sh ad-hoc, when necessary. You can schedule it via the host (via cron, etc). |
| 46 | +3. I recommend that you only pull versioned containers, not latest. |
22 | 47 |
|
0 commit comments