Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

chore(build): Optimize Docker build configuration and process

begoniezhaoa5c3623a02eb
diff --git a/docker/Dockerfile.app b/docker/Dockerfile.app
index 0ae72e14f..38693572a 100644
--- a/docker/Dockerfile.app
+++ b/docker/Dockerfile.app
@@ -24,6 +24,7 @@ RUN go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod go mod download
RUN --mount=type=cache,target=/go/pkg/mod cp -r /go/pkg/mod/github.com/yanyiwu/ /app/yanyiwu/
+COPY . .
# Get version and commit info for build injection
ARG VERSION_ARG
@@ -38,7 +39,6 @@ ENV BUILD_TIME=${BUILD_TIME_ARG}
ENV GO_VERSION=${GO_VERSION_ARG}
# Build the application with version info
-COPY . .
RUN --mount=type=cache,target=/go/pkg/mod make build-prod
# Final stage