feat: install `tzdata` in the docker image (#3056)

* disable caching of repository metadata and installation of tzdata

* add TZ variable example
pull/3066/head
清靈語 2023-01-16 13:43:15 +08:00 committed by GitHub
parent 8e2069c554
commit 1cfd47a258
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@ FROM alpine:edge as builder
LABEL stage=go-builder LABEL stage=go-builder
WORKDIR /app/ WORKDIR /app/
COPY ./ ./ COPY ./ ./
RUN apk add --no-cache bash git go gcc musl-dev curl; \ RUN apk add --no-cache bash curl gcc git go musl-dev; \
bash build.sh release docker bash build.sh release docker
FROM alpine:edge FROM alpine:edge
@ -11,7 +11,7 @@ VOLUME /opt/alist/data/
WORKDIR /opt/alist/ WORKDIR /opt/alist/
COPY --from=builder /app/bin/alist ./ COPY --from=builder /app/bin/alist ./
COPY entrypoint.sh /entrypoint.sh COPY entrypoint.sh /entrypoint.sh
RUN apk add ca-certificates bash su-exec; \ RUN apk add --no-cache bash ca-certificates su-exec tzdata; \
chmod +x /entrypoint.sh chmod +x /entrypoint.sh
ENV PUID=0 PGID=0 UMASK=022 ENV PUID=0 PGID=0 UMASK=022
EXPOSE 5244 EXPOSE 5244

View File

@ -10,5 +10,6 @@ services:
- PUID=0 - PUID=0
- PGID=0 - PGID=0
- UMASK=022 - UMASK=022
- TZ=UTC
container_name: alist container_name: alist
image: 'xhofe/alist:latest' image: 'xhofe/alist:latest'