diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86bb45b..307e0dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,6 @@ jobs: uses: docker/metadata-action@v4 with: images: jpillora/chisel - tag-latest: true tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} diff --git a/Dockerfile b/Dockerfile index 48bb3cf..75efda1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,11 +6,12 @@ ADD . /src WORKDIR /src RUN go mod download RUN go build \ - -ldflags "-X main.version=$(git describe --abbrev=0 --tags)" \ + -tags timetzdata \ + -ldflags "-extldflags -static -X main.version=$(git describe --abbrev=0 --tags)" \ -o serve # run stage -FROM gcr.io/distroless/static-debian11 +FROM scratch +COPY --from=alpine:latest /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ WORKDIR /app -CMD ["/app"] COPY --from=build /src/serve /app/serve ENTRYPOINT ["/app/serve"] \ No newline at end of file