Skip to content

Commit

Permalink
switch to scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
jpillora committed Jan 27, 2023
1 parent ca0e308 commit 0f9586e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 0f9586e

Please sign in to comment.