fix: make go.work.sum optional in Dockerfiles
Use glob pattern go.work.su[m] instead of go.work.sum to allow the COPY to succeed even when go.work.sum doesn't exist yet. This happens on fresh monorepos before dependencies are synced. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
b093a4b26d
commit
196e3d96e8
@ -10,8 +10,9 @@ ENV GOWORK=/app/go.work
|
||||
WORKDIR /app
|
||||
|
||||
# Copy go workspace and all source (workspace deps are local)
|
||||
# Note: go.work.sum may not exist if no external dependencies have been synced yet
|
||||
COPY go.work ./
|
||||
COPY go.work.sum ./
|
||||
COPY go.work.su[m] ./
|
||||
COPY pkg/ ./pkg/
|
||||
COPY services/{{COMPONENT_NAME}}/ ./services/{{COMPONENT_NAME}}/
|
||||
|
||||
|
||||
@ -10,8 +10,9 @@ ENV GOWORK=/app/go.work
|
||||
WORKDIR /app
|
||||
|
||||
# Copy go workspace and all source (workspace deps are local)
|
||||
# Note: go.work.sum may not exist if no external dependencies have been synced yet
|
||||
COPY go.work ./
|
||||
COPY go.work.sum ./
|
||||
COPY go.work.su[m] ./
|
||||
COPY pkg/ ./pkg/
|
||||
COPY workers/{{COMPONENT_NAME}}/ ./workers/{{COMPONENT_NAME}}/
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user