Skip to content

Commit ee1e017

Browse files
tac0turtleclaude
andcommitted
fix(ci): copy testapp go.mod/go.sum before download, fix hadolint warnings
Also copy apps/testapp/go.mod and apps/testapp/go.sum before running go mod download so the testapp's own dependencies are cached in their own layer (separate from the root module). Replace RUN cd ... && go install with WORKDIR + go build to resolve hadolint DL3003 and DL3062. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 91fd6fa commit ee1e017

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

apps/testapp/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ WORKDIR /ev-node
2020
# Copy module files first to leverage Docker layer caching.
2121
# Dependencies are only re-downloaded when go.mod or go.sum change.
2222
COPY go.mod go.sum ./
23-
RUN go mod download
23+
COPY apps/testapp/go.mod apps/testapp/go.sum ./apps/testapp/
24+
RUN go mod download && (cd apps/testapp && go mod download)
2425

2526
# Copy the rest of the source and build.
2627
COPY . .
27-
RUN cd apps/testapp && go install .
28+
29+
WORKDIR /ev-node/apps/testapp
30+
RUN go build -o /go/bin/testapp .
2831

2932
## prep the final image.
3033
#

0 commit comments

Comments
 (0)