私信  •  关注

Danack

Danack 最近创建的主题
Danack 最近回复了
11 月前
回复了 Danack 创建的主题 » Docker PHP7 CLI Debian Buster如何安装php imagick包?

除非你有充分的理由不使用 https://deb.sury.org/ 可能是个好主意。以下操作似乎有效:

FROM debian:buster-slim

USER root

# Get Debian up-to-date
RUN apt-get update -qq \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y git \
    mariadb-client wget curl \
    ca-certificates lsb-release apt-transport-https gnupg bsdmainutils

RUN echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee -a /etc/apt/sources.list.d/php.list \
    && curl https://packages.sury.org/php/apt.gpg | apt-key add - \
    && apt-get update -qq \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y php7.3 php7.3-common php7.3-cli \
    php7.3-mysql php7.3-curl php7.3-xml php7.3-mbstring \
    php7.3-intl php7.3-redis php7.3-zip \
    php7.3-imagick supervisor