1. ./docker/Dockerfile
官方版本:https://calibre-ebook.com/zh_CN/download_linux
FROM ubuntu:20.04
USER root
# wget https://download.calibre-ebook.com/linux-installer.sh
RUN apt update && \
apt install -y wget python3 && \
apt install -y libfontconfig libegl1 libopengl0 python3-pip libx11-dev libxkbcommon-dev libglx-dev
RUN mkdir -p /opt/calibre && \
cd /opt/calibre && \
wget https://calibre-ebook.com/dist/linux-x86_64 -O calibre-x86_64.txz && \
tar xJf calibre-x86_64.txz && \
rm -f calibre-x86_64.txz
WORKDIR /opt/calibre
2. docker-compose.yml
version: "2.1"
services:
calibre-cmd:
build:
context: ./docker
dockerfile: ./Dockerfile
network: host
image: calibre:6.11.0
container_name: calibre-cmd
command:
- "sleep"
- "10000000"
volumes:
- /etc/localtime:/etc/localtime
- ./data:/data
restart: unless-stopped
network_mode: bridge