This commit is contained in:
@@ -7,38 +7,34 @@ LABEL version="7.4" \
|
||||
|
||||
WORKDIR /srv
|
||||
|
||||
# 系统设置(设置时区)
|
||||
RUN rm -rf /etc/localtime \
|
||||
&& ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& echo "Asia/Shanghai" /etc/timezone
|
||||
|
||||
# 添加 Composer
|
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# 国内源
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
|
||||
# 添加 Caddy
|
||||
COPY --from=base /usr/bin/caddy /usr/bin/caddy
|
||||
COPY caddy/Caddyfile /etc/caddy/
|
||||
COPY --from=base /usr/share/caddy /usr/share/caddy
|
||||
COPY --from=base /etc/nsswitch.conf /etc/nsswitch.conf
|
||||
|
||||
RUN apk add --no-cache ca-certificates mailcap \
|
||||
&& set -eux \
|
||||
&& mkdir -p \
|
||||
/config/caddy \
|
||||
/data/caddy \
|
||||
/etc/caddy \
|
||||
/usr/share/caddy
|
||||
ADD caddy/startup .
|
||||
|
||||
# See https://caddyserver.com/docs/conventions#file-locations for details
|
||||
ENV XDG_CONFIG_HOME /config
|
||||
ENV XDG_DATA_HOME /data
|
||||
|
||||
|
||||
# 系统设置(设置时区)
|
||||
# 国内源 && 系统更新
|
||||
RUN rm -rf /etc/localtime \
|
||||
&& ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& echo "Asia/Shanghai" /etc/timezone \
|
||||
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
|
||||
&& apk update \
|
||||
&& apk upgrade \
|
||||
&& apk add --no-cache ca-certificates mailcap \
|
||||
&& chmod +x ./startup && pwd && ls -la
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
# 入口
|
||||
ADD caddy/startup .
|
||||
RUN chmod +x ./startup && pwd && ls -la
|
||||
RUN
|
||||
ENTRYPOINT ./startup
|
||||
Reference in New Issue
Block a user