diff --git a/zoneinfo/Dockerfile b/zoneinfo/Dockerfile new file mode 100644 index 000000000..3a134aa7e --- /dev/null +++ b/zoneinfo/Dockerfile @@ -0,0 +1,15 @@ +FROM alpine:3 as zoneinfo +RUN apk --no-cache add ca-certificates +# ADD https://github.com/golang/go/raw/master/lib/time/zoneinfo.zip . +# 2020f +ADD https://github.com/golang/go/tree/20d0991b86f533a734cad96b2002678d9750e6d8/lib/time/zoneinfo.zip . + +FROM scratch +# https://golang.org/pkg/time/#LoadLocation +# https://golang.org/src/time/zoneinfo_unix.go +# Many systems use /usr/share/zoneinfo, Solaris 2 has +# /usr/share/lib/zoneinfo, IRIX 6 has /usr/lib/locale/TZ. +ENV ZONEINFO /usr/share/zoneinfo + +# Copy the time zone database. +COPY --from=zoneinfo /zoneinfo.zip /usr/share/zoneinfo diff --git a/zoneinfo/cloudbuild.yaml b/zoneinfo/cloudbuild.yaml new file mode 100644 index 000000000..378b8ca25 --- /dev/null +++ b/zoneinfo/cloudbuild.yaml @@ -0,0 +1,15 @@ +# In this directory, run the following command to build this builder. +# $ gcloud builds submit + +steps: +# Build all supported versions. +- name: 'gcr.io/cloud-builders/docker' + args: + - 'build' + - '--tag=us.gcr.io/$PROJECT_ID/zoneinfo:2020f' + - '.' + +timeout: 1m0s + +images: +- 'us.gcr.io/$PROJECT_ID/zoneinfo:2020f'