From 1855e187341609b7f9699ebe9cfb15dd8bc4b67b Mon Sep 17 00:00:00 2001 From: bobo liu <7552030+fakeboboliu@users.noreply.github.com> Date: Tue, 29 Aug 2023 22:43:59 +0800 Subject: [PATCH] Chore: embed tzdata for weirdos and newbies (#2890) --- Dockerfile | 3 +-- main.go | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 954ede7..980d018 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ 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 WORKDIR /workdir COPY --from=tonistiigi/xx:golang / / @@ -15,7 +15,6 @@ RUN --mount=target=. \ FROM alpine:latest 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 /Country.mmdb /root/.config/clash/ COPY --from=builder /clash / diff --git a/main.go b/main.go index 55dd5eb..915d8b3 100644 --- a/main.go +++ b/main.go @@ -8,6 +8,7 @@ import ( "path/filepath" "runtime" "syscall" + _ "time/tzdata" "github.com/Dreamacro/clash/config" C "github.com/Dreamacro/clash/constant"