Dockerfile
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -13,14 +13,17 @@ ENV GOTOOLCHAIN=auto
|
||||
ENV GOPRIVATE=gitea.com/red-future/common
|
||||
|
||||
# 配置git使用私有Gitea仓库
|
||||
RUN git config --global url."http://x-token-auth:9b31146aa8c10a7cb4f2e49dcee0934a223be1076289810e1ad98b968066c2bc@116.204.74.41:3000/red-future/common.git".insteadOf "https://gitea.com/red-future/common.git" && \
|
||||
RUN git config --global url."http://116.204.74.41:3000/red-future/common.git".insteadOf "https://gitea.com/red-future/common.git" && \
|
||||
git config --global credential.helper store
|
||||
|
||||
# 设置GIT凭据
|
||||
RUN echo "http://x-token-auth:9b31146aa8c10a7cb4f2e49dcee0934a223be1076289810e1ad98b968066c2bc@116.204.74.41:3000" > ~/.git-credentials
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# 复制父目录的 common 模块(因为 go.mod 中使用了本地 replace)
|
||||
COPY ../common /build/common
|
||||
COPY . .
|
||||
COPY go.mod go.sum ./
|
||||
COPY main.go ./
|
||||
COPY config.yml ./
|
||||
|
||||
RUN go mod download && go mod tidy
|
||||
|
||||
|
||||
4
go.mod
4
go.mod
@@ -3,7 +3,7 @@ module assets
|
||||
go 1.25.8
|
||||
|
||||
require (
|
||||
gitea.com/red-future/common v0.0.6
|
||||
gitea.com/red-future/common v0.0.7
|
||||
github.com/bjang03/gmq v0.0.0-20251219093200-000000000000
|
||||
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.10.0
|
||||
github.com/gogf/gf/v2 v2.10.0
|
||||
@@ -12,7 +12,7 @@ require (
|
||||
go.mongodb.org/mongo-driver/v2 v2.5.0
|
||||
)
|
||||
|
||||
replace gitea.com/red-future/common v0.0.6 => ../common
|
||||
replace gitea.com/red-future/common v0.0.7 => ../common
|
||||
|
||||
replace github.com/bjang03/gmq => ../gmq
|
||||
|
||||
|
||||
Reference in New Issue
Block a user