使用 Dockerfile 打包 calibre 电子书工具的 docker 镜像

创建日期: 2023-02-01 10:40 | 作者: 风波 | 浏览次数: 12 | 分类: Docker

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
12 浏览
0 评论