Skip to content

Commit 9338e54

Browse files
Remove vendored deps, use go mod download in Dockerfile
Removes the vendor/ directory (~7M LOC) and switches to go mod download at build time. The Dockerfile now copies go.mod/go.sum first for layer caching, then builds with the module cache. Much cleaner diff — same binary output.
1 parent 211b519 commit 9338e54

2,942 files changed

Lines changed: 4 additions & 7178587 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

frameworks/gin/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
FROM golang:1.24-alpine AS build
22
WORKDIR /app
3-
COPY . .
4-
RUN CGO_ENABLED=0 go build -mod=vendor -o server main.go
3+
COPY go.mod go.sum ./
4+
RUN go mod download
5+
COPY main.go ./
6+
RUN CGO_ENABLED=0 go build -o server main.go
57

68
FROM alpine:3.19
79
COPY --from=build /app/server /server

frameworks/gin/vendor/github.com/bytedance/sonic/.gitignore

Lines changed: 0 additions & 52 deletions
This file was deleted.

frameworks/gin/vendor/github.com/bytedance/sonic/.gitmodules

Lines changed: 0 additions & 6 deletions
This file was deleted.

frameworks/gin/vendor/github.com/bytedance/sonic/.licenserc.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

frameworks/gin/vendor/github.com/bytedance/sonic/CODE_OF_CONDUCT.md

Lines changed: 0 additions & 128 deletions
This file was deleted.

frameworks/gin/vendor/github.com/bytedance/sonic/CONTRIBUTING.md

Lines changed: 0 additions & 63 deletions
This file was deleted.

frameworks/gin/vendor/github.com/bytedance/sonic/CREDITS

Whitespace-only changes.

0 commit comments

Comments
 (0)