Skip to content

Commit

Permalink
build: adjust go build
Browse files Browse the repository at this point in the history
  • Loading branch information
kimdre authored Jul 31, 2024
1 parent 8b1076d commit 5d6e081
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ ENV GOCACHE=/root/.cache/go-build \
CGO_ENABLED=0 \
GOOS=linux

# Build
# Build and strip binary
RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=cache,target="/root/.cache/go-build" \
--mount=type=bind,target=. \
go build -o / ./...
go build -ldflags="-s -w" -o / ./...

# Run the tests in the container
FROM build-stage AS run-test-stage
Expand Down

0 comments on commit 5d6e081

Please sign in to comment.