From 856dbf309df7a09d7763046e5c86478c2ad55ac9 Mon Sep 17 00:00:00 2001 From: konard Date: Tue, 17 Mar 2026 18:10:03 +0000 Subject: [PATCH 1/4] Initial commit with task details Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: https://github.com/ProverCoderAI/docker-git/issues/151 --- .gitkeep | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitkeep diff --git a/.gitkeep b/.gitkeep new file mode 100644 index 00000000..a34907f4 --- /dev/null +++ b/.gitkeep @@ -0,0 +1 @@ +# .gitkeep file auto-generated at 2026-03-17T18:10:03.335Z for PR creation at branch issue-151-fdbc80a12746 for issue https://github.com/ProverCoderAI/docker-git/issues/151 \ No newline at end of file From e949ecca51b8b49cc8338ee710409e7c3f347f71 Mon Sep 17 00:00:00 2001 From: konard Date: Tue, 17 Mar 2026 18:11:18 +0000 Subject: [PATCH 2/4] fix(core): escape backslash in sed command for CRLF stripping in Dockerfile template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sed pattern 's/\r$//' in a TypeScript template string was being interpreted as a literal carriage return (\r), producing invalid shell syntax in the generated Dockerfile. Escaping to '\\r' ensures the generated Dockerfile contains the literal text '\r', correctly stripping Windows-style CRLF line endings from entrypoint.sh. INVARIANT: ∀ generated Dockerfile: sed pattern renders as 's/\r$//' in shell PURITY: CORE - pure template transformation, no side effects Fixes #151 Co-Authored-By: Claude Sonnet 4.6 --- packages/lib/src/core/templates/dockerfile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lib/src/core/templates/dockerfile.ts b/packages/lib/src/core/templates/dockerfile.ts index f5c39c4f..6c70690a 100644 --- a/packages/lib/src/core/templates/dockerfile.ts +++ b/packages/lib/src/core/templates/dockerfile.ts @@ -225,7 +225,7 @@ RUN mkdir -p ${config.targetDir} \ && if [ "${config.targetDir}" != "/" ]; then chown -R 1000:1000 "${config.targetDir}"; fi COPY entrypoint.sh /entrypoint.sh -RUN sed -i 's/\r$//' /entrypoint.sh && chmod +x /entrypoint.sh +RUN sed -i 's/\\r$//' /entrypoint.sh && chmod +x /entrypoint.sh EXPOSE 22 ENTRYPOINT ["/entrypoint.sh"]` From 7b155d9fb5b4bab557c6015ca9134c056fa7679c Mon Sep 17 00:00:00 2001 From: konard Date: Tue, 17 Mar 2026 18:11:57 +0000 Subject: [PATCH 3/4] Revert "Initial commit with task details" This reverts commit 856dbf309df7a09d7763046e5c86478c2ad55ac9. --- .gitkeep | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .gitkeep diff --git a/.gitkeep b/.gitkeep deleted file mode 100644 index a34907f4..00000000 --- a/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -# .gitkeep file auto-generated at 2026-03-17T18:10:03.335Z for PR creation at branch issue-151-fdbc80a12746 for issue https://github.com/ProverCoderAI/docker-git/issues/151 \ No newline at end of file From 0f002af4ff8ca8ef9fda3f83882b502bb29e9c79 Mon Sep 17 00:00:00 2001 From: konard Date: Tue, 17 Mar 2026 18:29:44 +0000 Subject: [PATCH 4/4] fix(core): pin opencode version to avoid GitHub API rate limit failures Pin opencode to version 1.2.27 by passing --version flag to the install script. Without a pinned version, the installer fetches the latest version from the GitHub API (api.github.com/repos/anomalyco/opencode/releases/latest), which fails with "Failed to fetch version information" when rate-limited or network-throttled during Docker builds in CI. This is the root cause of the E2E (Clone cache) CI failure. Co-Authored-By: Claude Sonnet 4.6 --- packages/lib/src/core/templates/dockerfile.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/lib/src/core/templates/dockerfile.ts b/packages/lib/src/core/templates/dockerfile.ts index 6c70690a..9ff9c7ed 100644 --- a/packages/lib/src/core/templates/dockerfile.ts +++ b/packages/lib/src/core/templates/dockerfile.ts @@ -64,12 +64,14 @@ RUN claude --version RUN npm install -g @google/gemini-cli@latest --force RUN gemini --version` +const openCodeVersion = "1.2.27" + const renderDockerfileOpenCode = (): string => `# Tooling: OpenCode (binary) RUN set -eu; \ for attempt in 1 2 3 4 5; do \ if curl -fsSL --retry 5 --retry-all-errors --retry-delay 2 https://opencode.ai/install \ - | HOME=/usr/local bash -s -- --no-modify-path; then \ + | HOME=/usr/local bash -s -- --version ${openCodeVersion} --no-modify-path; then \ exit 0; \ fi; \ echo "opencode install attempt \${attempt} failed; retrying..." >&2; \