Chore: embed tzdata for weirdos and newbies (#2890)

This commit is contained in:
bobo liu 2023-08-29 22:43:59 +08:00 committed by GitHub
parent 5ec4d993b8
commit 1855e18734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
FROM --platform=${BUILDPLATFORM} golang:alpine as builder FROM --platform=${BUILDPLATFORM} golang:alpine as builder
RUN apk add --no-cache make git ca-certificates tzdata && \ RUN apk add --no-cache make git ca-certificates && \
wget -O /Country.mmdb https://github.com/Dreamacro/maxmind-geoip/releases/latest/download/Country.mmdb wget -O /Country.mmdb https://github.com/Dreamacro/maxmind-geoip/releases/latest/download/Country.mmdb
WORKDIR /workdir WORKDIR /workdir
COPY --from=tonistiigi/xx:golang / / COPY --from=tonistiigi/xx:golang / /
@ -15,7 +15,6 @@ RUN --mount=target=. \
FROM alpine:latest FROM alpine:latest
LABEL org.opencontainers.image.source="https://github.com/Dreamacro/clash" LABEL org.opencontainers.image.source="https://github.com/Dreamacro/clash"
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /Country.mmdb /root/.config/clash/ COPY --from=builder /Country.mmdb /root/.config/clash/
COPY --from=builder /clash / COPY --from=builder /clash /

View File

@ -8,6 +8,7 @@ import (
"path/filepath" "path/filepath"
"runtime" "runtime"
"syscall" "syscall"
_ "time/tzdata"
"github.com/Dreamacro/clash/config" "github.com/Dreamacro/clash/config"
C "github.com/Dreamacro/clash/constant" C "github.com/Dreamacro/clash/constant"