init project

This commit is contained in:
admin committed 2026-11-11 17:49:38 +08:00
1 parent aee8bcc886
commit a82a843b76
9 files changed
+20 -11

No files matched your search

+7 -3
View File
@@ -1,10 +1,14 @@
FROM golang:1.27.3-alpine AS builder
RUN apk add --no-cache git openssh-client
ENV GOPRIVATE=git.vitatech.com.cn
RUN git config --global url."ssh://git@git.vitatech.com.cn:12222/".insteadOf "https://git.vitatech.com.cn/" \
&& mkdir -p -m 0700 /root/.ssh
WORKDIR /src
COPY proto/go.mod proto/go.sum ./proto/
COPY gin_layout/go.mod gin_layout/go.sum ./gin_layout/
WORKDIR /src/gin_layout
RUN go mod download
COPY proto /src/proto
RUN --mount=type=ssh,required=true \
--mount=type=secret,id=git_known_hosts,target=/root/.ssh/known_hosts,required=true \
go mod download
COPY gin_layout /src/gin_layout
RUN CGO_ENABLED=0 go build -trimpath -o /out/api ./cmd/api