perf: Go 1.26, BuildKit cache mounts

This commit is contained in:
Hanzo Dev
2026-03-02 11:56:32 -08:00
parent 5e3f4d808e
commit 65e18c5fff
4 changed files with 47 additions and 4 deletions
+9
View File
@@ -0,0 +1,9 @@
.git
.github
*.md
LICENSE
compose.yml
docker-compose*.yml
*.test
*.prof
*.out
+29
View File
@@ -0,0 +1,29 @@
# Binaries
*.exe
*.exe~
*.dll
*.so
*.dylib
hanzo-stream
# Test artifacts
*.test
*.out
*.prof
coverage.out
# IDE
.idea/
.vscode/
*.swp
*.swo
*~
# OS
.DS_Store
# AI assistant config
CLAUDE.md
AGENTS.md
GEMINI.md
QWEN.md
+8 -3
View File
@@ -1,4 +1,5 @@
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS builder
ARG TARGETOS=linux
ARG TARGETARCH=amd64
@@ -7,9 +8,13 @@ RUN apk add --no-cache git
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-s -w" -o /hanzo-stream .
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-s -w" -o /hanzo-stream .
FROM alpine:3.20
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hanzoai/stream
go 1.23.4
go 1.26.0
require (
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3