From 68ec46855fa87885a87a9e198dd0fe6b653394f3 Mon Sep 17 00:00:00 2001 From: netfun2000 Date: Sat, 21 Jun 2025 17:12:49 +0800 Subject: [PATCH] Update Dockerfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加sftp,设置时区。 --- Dockerfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5a7c580..1352049 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ +ENV TZ=Asia/Shanghai ARG ALPINE_VERSION=3.21 FROM alpine:${ALPINE_VERSION} LABEL Maintainer="Tim de Pater " @@ -6,7 +7,8 @@ LABEL Description="Lightweight container with Nginx 1.26 & PHP 8.4 based on Alpi WORKDIR /var/www/html # Install packages and remove default server definition -RUN apk add --no-cache \ +RUN echo "https://dl-cdn.alpinelinux.org/alpine/v${ALPINE_VERSION}/community" >> /etc/apk/repositories && \ + apk update && apk add --no-cache \ curl \ nginx \ php84 \ @@ -27,7 +29,14 @@ RUN apk add --no-cache \ php84-xml \ php84-xmlreader \ php84-xmlwriter \ - supervisor + supervisor \ + expect \ + procps \ + openssh \ + openssh-sftp-server \ + && cp /usr/share/zoneinfo/$TZ /etc/localtime \ + && echo "$TZ" > /etc/timezone \ + && rm -rf /var/cache/apk/* RUN ln -s /usr/bin/php84 /usr/bin/php