Skip to content

Commit

Permalink
Merge pull request #155 from authzed/chainguard-images
Browse files Browse the repository at this point in the history
docker: swap to chainguard images
  • Loading branch information
josephschorr committed Sep 30, 2022
2 parents 03e9df9 + b066f65 commit 7f92a30
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .goreleaser.docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dockers:
use: "buildx"
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=BASE=distroless.dev/alpine-base"
- "--build-arg=BASE=cgr.dev/chainguard/musl-dynamic:latest"
# ARM64
- image_templates:
- &arm_image_quay "quay.io/authzed/zed:v{{ .Version }}-arm64"
Expand All @@ -79,7 +79,7 @@ dockers:
use: "buildx"
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=BASE=distroless.dev/alpine-base"
- "--build-arg=BASE=cgr.dev/chainguard/musl-dynamic:latest"

docker_manifests:
# Quay
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,4 @@ release:
footer: |
## Docker Images
This release is available at `quay.io/authzed/zed:{{ .Version }}`
This release is available at `quay.io/authzed/zed:v{{ .Version }}`
18 changes: 7 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
FROM golang:1.19.1-alpine3.16 AS build
FROM golang:1.19-alpine3.16 AS zed-builder
WORKDIR /go/src/app
RUN apk update && apk add --no-cache git
COPY . .
RUN go build -v ./cmd/zed/

RUN apk update
RUN apk add git

WORKDIR /go/src/zed
COPY . /go/src/zed
RUN go mod download
RUN go install ./cmd/zed

FROM distroless.dev/alpine-base
COPY --from=build /go/bin/* /usr/local/bin/
FROM cgr.dev/chainguard/musl-dynamic:latest
COPY --from=zed-builder /go/src/app/zed /usr/local/bin/zed
ENTRYPOINT ["zed"]
3 changes: 2 additions & 1 deletion Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# vim: syntax=dockerfile
ARG BASE=distroless.dev/alpine-base
ARG BASE=cgr.dev/chainguard/musl-dynamic:latest

FROM $BASE

COPY zed /usr/local/bin/zed
Expand Down
6 changes: 4 additions & 2 deletions internal/grpcutil/grpcutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import (

// Compile-time assertion that LogDispatchTrailers and CheckServerVersion implement the
// grpc.UnaryClientInterceptor interface.
var _ grpc.UnaryClientInterceptor = grpc.UnaryClientInterceptor(LogDispatchTrailers)
var _ grpc.UnaryClientInterceptor = grpc.UnaryClientInterceptor(CheckServerVersion)
var (
_ grpc.UnaryClientInterceptor = grpc.UnaryClientInterceptor(LogDispatchTrailers)
_ grpc.UnaryClientInterceptor = grpc.UnaryClientInterceptor(CheckServerVersion)
)

// CheckServerVersion implements a gRPC unary interceptor that requests the server version
// from SpiceDB and, if found, compares it to the current released version.
Expand Down

0 comments on commit 7f92a30

Please sign in to comment.