From 1cf02e54062e89babffab717fbeb6c9d6caf5c4e Mon Sep 17 00:00:00 2001 From: catop <601179193@qq.com> Date: Sat, 20 Apr 2024 15:35:39 +0800 Subject: [PATCH] Upgrading the base environment to deian:buster and fix php dependencies --- Dockerfile | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index fa56826..a9f437d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,30 @@ # Yeah I know... not the perfect one # but you know, never change a running # system... -FROM debian:jessie +FROM debian:buster MAINTAINER t0kx +MAINTAINER catop + +# for old version php installation(5.6) +RUN apt-get update && \ + apt-get install -y wget && \ + wget -O /etc/apt/trusted.gpg.d/php.gpg https://mirror.xtom.com.hk/sury/php/apt.gpg && \ + apt-get install -y apt-transport-https && \ + echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list # install debian stuff RUN apt-get update && \ apt-get upgrade -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y \ - wget apache2 php5 php5-sqlite sqlite3 git golang sendmail-bin \ - && apt-get clean && rm -rf /var/lib/apt/lists/* + wget apache2 php5.6 php5.6-sqlite3 sqlite3 git golang sendmail-bin + +# install php extensions +RUN apt-get install -y php5.6-mbstring php5.6-zip && \ + apt-get clean && rm -rf /var/lib/apt/lists/* # "configure" smtpd and imapd -RUN echo "127.0.1.1 myhostname myhostname" >> /etc/hosts && \ - GOPATH=/tmp/ go get github.com/jordwest/imap-server/demo && \ +RUN GOPATH=/tmp/ go get github.com/jordwest/imap-server/demo && \ GOPATH=/tmp/ go build github.com/jordwest/imap-server/demo && \ yes Y | sendmailconfig