修复Dockerfile时区失效&APK源指向latest-stable&增加php的openssl

This commit is contained in:
wu
2022-09-26 20:53:27 +08:00
parent b00e96caa0
commit cec792f425

View File

@@ -1,15 +1,18 @@
FROM alpine:latest
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
RUN echo 'https://mirrors.ustc.edu.cn/alpine/latest-stable/main/' > /etc/apk/repositories \
&& echo 'https://mirrors.ustc.edu.cn/alpine/latest-stable/community/' >> /etc/apk/repositories \
&& apk update \
&& apk --no-cache add -U tzdata && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && apk del tzdata
&& apk add alpine-conf \
&& /sbin/setup-timezone -z $TZ \
&& apk del alpine-conf
RUN apk --no-cache add php81 \
php81-posix \
php81-pcntl \
php81-pgsql \
php81-openssl \
php81-mbstring \
php81-curl \
php81-phar \