/
/
/
Ansible role that provisions my storage server.
1# The base is passed in by compose (arr-stack-compose.yml.j2) from the pinned
2# lazylibrarian_image/lazylibrarian_version, so the build is reproducible.
3ARG BASE_IMAGE=lscr.io/linuxserver/lazylibrarian:e7c7ce2d-ls262
4FROM ${BASE_IMAGE}
5
6# minimal system libs for Calibre on Ubuntu 24.04 (Noble)
7RUN apt-get update && \
8 DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
9 libegl1 libopengl0 libxcb-cursor0 libxkbcommon-x11-0 libxcomposite1 libxrandr2 \
10 libnss3 libasound2t64 xdg-utils curl xz-utils ca-certificates && \
11 update-ca-certificates && rm -rf /var/lib/apt/lists/*
12
13# install calibre
14RUN curl -fsSL https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin
15
16# EITHER: let Calibre create its own wrappers in /usr/bin
17RUN /opt/calibre/calibre_postinstall || true
18
19# OR: provide our own simple wrapper (robust in containers)
20RUN printf '%s\n' '#!/bin/sh' \
21 'export LD_LIBRARY_PATH=/opt/calibre/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}' \
22 'export QT_PLUGIN_PATH=/opt/calibre/plugins' \
23 'export QT_QPA_PLATFORM=offscreen' \
24 'exec /opt/calibre/bin/calibredb "$@"' \
25 > /usr/local/bin/calibredb && chmod +x /usr/local/bin/calibredb
26