Skip to content

Commit

Permalink
Merge pull request #213 from ecordell/fix-dockerrelease
Browse files Browse the repository at this point in the history
Fix docker release images
  • Loading branch information
ecordell committed Oct 26, 2021
2 parents 4e70dde + 6472d7a commit 9af26b2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,14 @@ brews:
dockers:
- image_templates:
- &amd_image "quay.io/authzed/spicedb:{{ .Version }}-amd64"
ids: ["linux-amd64"]
dockerfile: &dockerfile "Dockerfile"
dockerfile: &dockerfile "Dockerfile.release"
goos: "linux"
goarch: "amd64"
use: "buildx"
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- &arm_image "quay.io/authzed/spicedb:{{ .Version }}-arm64"
ids: ["linux-arm64"]
dockerfile: *dockerfile
goos: "linux"
goarch: "arm64"
Expand All @@ -92,3 +90,6 @@ changelog:
release:
draft: true
prerelease: "auto"
footer: |
## Docker Images
This release is available at `quay.io/authzed/spicedb:{{ .Version }}`
14 changes: 14 additions & 0 deletions Dockerfile.release
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# vim: syntax=dockerfile
FROM alpine:3.13 AS grpc
ARG TARGETPLATFORM
ARG GRPC_HEALTH_PROBE_VERSION=0.3.6
RUN apk add curl
RUN curl -v -Lo /etc/grpc_health_probe "https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-$(echo $TARGETPLATFORM | tr / -)"
RUN chmod +x /etc/grpc_health_probe
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf

FROM gcr.io/distroless/base
COPY --from=grpc /etc/nsswitch.conf /etc/nsswitch.conf
COPY --from=grpc /etc/grpc_health_probe /usr/local/bin/grpc_health_probe
COPY spicedb /usr/local/bin/spicedb
ENTRYPOINT ["spicedb"]

0 comments on commit 9af26b2

Please sign in to comment.