Skip to content

Commit 56f770e

Browse files
authored
fix: goreleaser specific dockerfile (#157)
1 parent c23b8b3 commit 56f770e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.goreleaser.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ builds:
55
- linux
66
- windows
77
- darwin
8+
ldflags:
9+
- -X github.com/envelope-zero/backend/internal/controllers.version={{.Version}}
810
archives:
911
- replacements:
1012
darwin: Darwin
@@ -24,10 +26,9 @@ changelog:
2426
- "^test:"
2527

2628
dockers:
27-
- image_templates:
29+
- dockerfile: Dockerfile.goreleaser
30+
image_templates:
2831
- "ghcr.io/envelope-zero/backend:{{ .Tag }}"
2932
- "ghcr.io/envelope-zero/backend:v{{ .Major }}"
3033
- "ghcr.io/envelope-zero/backend:v{{ .Major }}.{{ .Minor }}"
3134
- "ghcr.io/envelope-zero/backend:latest"
32-
build_flag_templates:
33-
- "--build-arg=VERSION={{ .Tag }}"

Dockerfile.goreleaser

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM scratch
2+
COPY backend /backend
3+
ENTRYPOINT ["/backend"]

0 commit comments

Comments
 (0)