Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复容器运行环境时区的问题 #6305

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ RUN go mod download
COPY ./ ./
RUN bash build.sh release docker

FROM alpine:edge
FROM alpine:3.19
LABEL MAINTAINER="i@nn.ci"
VOLUME /opt/alist/data/
WORKDIR /opt/alist/
COPY --from=builder /app/bin/alist ./
COPY entrypoint.sh /entrypoint.sh
RUN apk update && \
RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories && \
apk upgrade --no-cache && \
apk add --no-cache bash ca-certificates su-exec tzdata; \
apk add --no-cache bash ca-certificates su-exec tzdata alpine-conf && \
/sbin/setup-timezone -z Asia/Shanghai && \
chmod +x /entrypoint.sh && \
rm -rf /var/cache/apk/*
apk del alpine-conf && rm -rf /var/cache/apk/*
ENV PUID=0 PGID=0 UMASK=022
EXPOSE 5244 5245
CMD [ "/entrypoint.sh" ]
10 changes: 5 additions & 5 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM alpine:edge
FROM alpine:3.19
ARG TARGETPLATFORM
LABEL MAINTAINER="i@nn.ci"
VOLUME /opt/alist/data/
WORKDIR /opt/alist/
COPY /${TARGETPLATFORM}/alist ./
COPY entrypoint.sh /entrypoint.sh
RUN apk update && \
RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories && \
apk upgrade --no-cache && \
apk add --no-cache bash ca-certificates su-exec tzdata; \
apk add --no-cache bash ca-certificates su-exec tzdata alpine-conf && \
/sbin/setup-timezone -z Asia/Shanghai && \
chmod +x /entrypoint.sh && \
rm -rf /var/cache/apk/* && \
/entrypoint.sh version
apk del alpine-conf && rm -rf /var/cache/apk/*
ENV PUID=0 PGID=0 UMASK=022
EXPOSE 5244 5245
CMD [ "/entrypoint.sh" ]
Loading