-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
56 lines (48 loc) · 1.87 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Use an Alpine linux base image with GNU libc (aka glibc) pre-installed, courtesy of Vlad Frolov
FROM frolvlad/alpine-glibc
MAINTAINER jakbutler
#########################################
## ENVIRONMENTAL CONFIG ##
#########################################
# Calibre environment variables
ENV CALIBRE_LIBRARY_DIRECTORY=/opt/calibredb/library
ENV CALIBRE_CONFIG_DIRECTORY=/opt/calibredb/config
# Auto-import directory
ENV CALIBREDB_IMPORT_DIRECTORY=/opt/calibredb/import
# Flag for automatically updating to the latest version on startup
ENV AUTO_UPDATE=0
#########################################
## DEPENDENCY INSTALL ##
#########################################
RUN apk update && \
apk add --no-cache --upgrade \
bash \
ca-certificates \
python \
wget \
gcc \
mesa-gl \
imagemagick \
qt5-qtbase-x11 \
xdg-utils \
xz && \
#########################################
## APP INSTALL ##
#########################################
wget -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main(install_dir='/opt', isolated=True)" && \
rm -rf /tmp/calibre-installer-cache
#########################################
## Script Setup ##
#########################################
ADD run_auto_importer.sh /usr/bin/run_auto_importer.sh
RUN chmod a+x /usr/bin/run_auto_importer.sh
#########################################
## EXPORTS AND VOLUMES ##
#########################################
VOLUME /opt/calibredb/config
VOLUME /opt/calibredb/import
VOLUME /opt/calibredb/library
#########################################
## Startup Command ##
#########################################
CMD /usr/bin/run_auto_importer.sh