There was an error while loading. Please reload this page.
1 parent 1d4a725 commit f31d5a3Copy full SHA for f31d5a3
2 files changed
.dockerignore
@@ -1,22 +1,8 @@
1
-.DS_Store
2
-.env
3
-.env.*
4
-.git
5
-.gitattributes
6
-.github
7
-.gitignore
8
-.goreleaser.yml
9
-*_test.go
10
-*.dll
11
-*.dylib
12
-*.exe
13
-*.gif
14
-*.log
15
-*.md
16
-*.so
17
-*.tape
18
-bin/
19
-dist/
20
-ffrelayctl
21
-LICENSE
22
-Thumbs.db
+*
+!go.mod
+!go.sum
+!main.go
+!api
+!cmd
+!output
+**/*_test.go
Dockerfile
@@ -2,16 +2,16 @@ FROM golang:1.27-alpine AS builder
WORKDIR /build
+ARG VERSION=dev
+
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build \
- -a \
- -installsuffix cgo \
- -ldflags='-w -s -extldflags "-static"' \
-trimpath \
+ -ldflags="-s -w -X main.version=${VERSION}" \
-o ffrelayctl .
FROM gcr.io/distroless/static:nonroot
0 commit comments