Skip to content

Commit

Permalink
Merge pull request #143 from vroldanbet/add-debug-image-variants
Browse files Browse the repository at this point in the history
add debug image variants
  • Loading branch information
jzelinskie authored Aug 17, 2022
2 parents 61e46e1 + 361a945 commit 09519d0
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 12 deletions.
74 changes: 64 additions & 10 deletions .goreleaser.docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,88 @@ builds:
ldflags: *ldflags

dockers:
# AMD64
- image_templates:
- &amd_image "quay.io/authzed/zed:{{ .Version }}-amd64"
- &amd_image_quay "quay.io/authzed/zed:v{{ .Version }}-amd64"
- &amd_image_gh "ghcr.io/authzed/zed:v{{ .Version }}-amd64"
- &amd_image_dh "authzed/zed:v{{ .Version }}-amd64"
ids: ["linux-amd64"]
dockerfile: &dockerfile "Dockerfile.release"
goos: "linux"
goarch: "amd64"
use: "buildx"
build_flag_templates:
- "--platform=linux/amd64"
# AMD64 (debug)
- image_templates:
- &arm_image "quay.io/authzed/zed:{{ .Version }}-arm64"
- &amd_debug_image_quay "quay.io/authzed/zed:v{{ .Version }}-amd64-debug"
- &amd_debug_image_gh "ghcr.io/authzed/zed:v{{ .Version }}-amd64-debug"
- &amd_debug_image_dh "authzed/zed:v{{ .Version }}-amd64-debug"
ids: ["linux-amd64"]
dockerfile: &dockerfile "Dockerfile.release"
goos: "linux"
goarch: "amd64"
use: "buildx"
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=BASE=distroless.dev/busybox"
# ARM64
- image_templates:
- &arm_image_quay "quay.io/authzed/zed:v{{ .Version }}-arm64"
- &arm_image_gh "ghcr.io/authzed/zed:v{{ .Version }}-arm64"
- &arm_image_dh "authzed/zed:v{{ .Version }}-arm64"
ids: ["linux-arm64"]
dockerfile: *dockerfile
goos: "linux"
goarch: "arm64"
use: "buildx"
build_flag_templates:
- "--platform=linux/arm64"
# ARM64 (debug)
- image_templates:
- &arm_debug_image_quay "quay.io/authzed/zed:v{{ .Version }}-arm64-debug"
- &arm_debug_image_gh "ghcr.io/authzed/zed:v{{ .Version }}-arm64-debug"
- &arm_debug_image_dh "authzed/zed:v{{ .Version }}-arm64-debug"
ids: ["linux-arm64"]
dockerfile: *dockerfile
goos: "linux"
goarch: "arm64"
use: "buildx"
build_flag_templates:
- "--platform=linux/arm64"
- "--build-arg=BASE=distroless.dev/busybox"

docker_manifests:
- name_template: "quay.io/authzed/zed:{{ .Version }}"
image_templates:
- *amd_image
- *arm_image
# Quay
- name_template: "quay.io/authzed/zed:v{{ .Version }}"
image_templates: [*amd_image_quay, *arm_image_quay]
- name_template: "quay.io/authzed/zed:latest"
image_templates:
- *amd_image
- *arm_image

image_templates: [*amd_image_quay, *arm_image_quay]
# GitHub Registry
- name_template: "ghcr.io/authzed/zed:v{{ .Version }}"
image_templates: [*amd_image_gh, *arm_image_gh]
- name_template: "ghcr.io/authzed/zed:latest"
image_templates: [*amd_image_gh, *arm_image_gh]
# Docker Hub
- name_template: "authzed/zed:v{{ .Version }}"
image_templates: [*amd_image_dh, *arm_image_dh]
- name_template: "authzed/zed:latest"
image_templates: [*amd_image_dh, *arm_image_dh]
# Debug Images:
# Quay (debug)
- name_template: "quay.io/authzed/zed:v{{ .Version }}-debug"
image_templates: [*amd_debug_image_quay, *arm_debug_image_quay]
- name_template: "quay.io/authzed/zed:latest-debug"
image_templates: [*amd_debug_image_quay, *arm_debug_image_quay]
# GitHub Registry
- name_template: "ghcr.io/authzed/zed:v{{ .Version }}-debug"
image_templates: [*amd_debug_image_gh, *arm_debug_image_gh]
- name_template: "ghcr.io/authzed/zed:latest-debug"
image_templates: [*amd_debug_image_gh, *arm_debug_image_gh]
# Docker Hub
- name_template: "authzed/zed:v{{ .Version }}-debug"
image_templates: [*amd_debug_image_dh, *arm_debug_image_dh]
- name_template: "authzed/zed:latest-debug"
image_templates: [*amd_debug_image_dh, *arm_debug_image_dh]
release:
disable: true
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ COPY . /go/src/zed
RUN go mod download
RUN go install ./cmd/zed

FROM gcr.io/distroless/base
FROM distroless.dev/static
COPY --from=build /go/bin/* /usr/local/bin/
ENTRYPOINT ["zed"]
4 changes: 3 additions & 1 deletion Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# vim: syntax=dockerfile
FROM gcr.io/distroless/base
ARG BASE=distroless.dev/static
FROM $BASE

COPY zed /usr/local/bin/zed
ENTRYPOINT ["zed"]

0 comments on commit 09519d0

Please sign in to comment.