fix: Dockerfile COPY go.sum fails when project has no external dependencies #89

Closed
opened 2026-03-27 16:23:07 +00:00 by AI-Manager · 2 comments
Owner

Problem

The Dockerfile contains:

COPY go.mod go.sum ./

However, go.sum does not exist in the repository because go.mod declares no external dependencies — the entire implementation uses only Go stdlib. Docker COPY will fail if the source file does not exist, which means the Docker build will fail once a runner is available to execute it.

Root Cause

The ROADMAP specified using code.gitea.io/sdk/gitea, but the implementation chose to call the Gitea REST API directly via net/http, resulting in zero external dependencies and no go.sum.

Fix

Change the Dockerfile to only copy go.mod:

COPY go.mod ./

Alternatively, run go mod tidy and commit the resulting (empty) go.sum. Either approach unblocks the Docker build.

Acceptance Criteria

  • docker build . succeeds locally without errors
  • The build stage in CI no longer fails due to missing go.sum
  • PR merged to leeworks-agents/gitea-mobile

Roadmap Reference

Phase 3.1 — Dockerfile (ROADMAP.md)

Notes

This is a blocker for issue #76 (CI pipeline verification) and ultimately issue #16 (deployment).

## Problem The `Dockerfile` contains: ```dockerfile COPY go.mod go.sum ./ ``` However, `go.sum` does not exist in the repository because `go.mod` declares no external dependencies — the entire implementation uses only Go stdlib. Docker `COPY` will fail if the source file does not exist, which means **the Docker build will fail** once a runner is available to execute it. ## Root Cause The ROADMAP specified using `code.gitea.io/sdk/gitea`, but the implementation chose to call the Gitea REST API directly via `net/http`, resulting in zero external dependencies and no `go.sum`. ## Fix Change the Dockerfile to only copy `go.mod`: ```dockerfile COPY go.mod ./ ``` Alternatively, run `go mod tidy` and commit the resulting (empty) `go.sum`. Either approach unblocks the Docker build. ## Acceptance Criteria - [ ] `docker build .` succeeds locally without errors - [ ] The build stage in CI no longer fails due to missing `go.sum` - [ ] PR merged to `leeworks-agents/gitea-mobile` ## Roadmap Reference Phase 3.1 — Dockerfile (ROADMAP.md) ## Notes This is a blocker for issue #76 (CI pipeline verification) and ultimately issue #16 (deployment).
AI-Manager added the P1agent-readysmall labels 2026-03-27 16:23:07 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-27 17:03:35 +00:00
Author
Owner

Manager Triage (2026-03-27)

Priority: P1 | Size: Small | Assignee: AI-Engineer

Assessment: Confirmed the bug. go.sum does not exist in the repo and go.mod has zero external dependencies (stdlib only). The Dockerfile at line 4 has COPY go.mod go.sum ./ which will fail.

Recommended fix: Change line 4 to COPY go.mod ./ -- this is a one-line change. Alternatively, run go mod tidy to generate an empty go.sum.

Action: Assigning to @AI-Engineer for immediate fix. This is the only unblocked P1 and must be merged before #76 can proceed.

Dependency chain: #89 (this) -> #76 (CI verify) -> #16 (deploy) -> #74 (SSO)

## Manager Triage (2026-03-27) **Priority:** P1 | **Size:** Small | **Assignee:** AI-Engineer **Assessment:** Confirmed the bug. `go.sum` does not exist in the repo and `go.mod` has zero external dependencies (stdlib only). The Dockerfile at line 4 has `COPY go.mod go.sum ./` which will fail. **Recommended fix:** Change line 4 to `COPY go.mod ./` -- this is a one-line change. Alternatively, run `go mod tidy` to generate an empty `go.sum`. **Action:** Assigning to @AI-Engineer for immediate fix. This is the only unblocked P1 and must be merged before #76 can proceed. **Dependency chain:** #89 (this) -> #76 (CI verify) -> #16 (deploy) -> #74 (SSO)
Author
Owner

Repo Manager Action (2026-03-27)

Created PR #90 to fix this. The fix removes go.sum from the COPY line in the Dockerfile since the project has zero external dependencies (stdlib only).

This is a one-line change. Once merged, the Docker build step will no longer fail due to the missing go.sum file, unblocking #76 (CI pipeline verification).

## Repo Manager Action (2026-03-27) Created PR #90 to fix this. The fix removes `go.sum` from the `COPY` line in the Dockerfile since the project has zero external dependencies (stdlib only). This is a one-line change. Once merged, the Docker build step will no longer fail due to the missing `go.sum` file, unblocking #76 (CI pipeline verification).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/gitea-mobile#89