Skip to content

Run bin/run.sh as the Docker entrypoint - #189

Merged
SleeplessByte merged 1 commit into
mainfrom
fix-docker-entrypoint
Nov 17, 2026
Merged

SleeplessByte merged 1 commit into
mainfrom
fix-docker-entrypoint

Conversation

@iHiD

@iHiD iHiD commented Nov 17, 2026

Copy link
Copy Markdown
Member

This PR was opened by Claude, an AI assistant working on iHiD's behalf.

What was broken

Every analyzer job in production fails. The tooling invoker logs each one as status 513 after about half a second, and students get no analysis. The invoker's logs go back 3.5 days, and every job in that period failed.

The Dockerfile sets ENTRYPOINT ["/opt/analyzer/bin/analyze.sh"], but .dockerignore excludes bin/ except for bin/run.sh. Since #152 (November 2023), analyze.sh has been missing from the image, so Docker can't start the container.

Evidence

A production job saved this error:

docker: Error response from daemon: failed to create task for container: ... exec: "/opt/analyzer/bin/analyze.sh": stat /opt/analyzer/bin/analyze.sh: no such file or directory

The production image has /opt/analyzer/bin/run.sh and nothing else in bin. Building main locally and running it gives the same error, with exit code 127. The smoke tests don't catch this, because bin/run-tests-in-docker.sh replaces the entrypoint with bin/run-tests.sh.

Fix

This PR points the entrypoint at /opt/analyzer/bin/run.sh. That script runs the same command as analyze.sh (node ./dist/analyze.js "$@"), and the other Exercism analyzers use it as their entrypoint.

Verification

  • I built the image and ran it the way the tooling invoker does: one directory mounted at /mnt/exercism-iteration, the arguments pizza-order /mnt/exercism-iteration/ /mnt/exercism-iteration/, with --network none --read-only. I used the test/fixtures/pizza-order/exemplar fixture. The container exited with 0, and the analysis.json it wrote matches expected_analysis.json.
  • bin/run-tests-in-docker.sh passes.

After merging

The Deploy workflow will build the image and push it to ECR with the production tag, which the tooling invoker runs. Analyzer jobs should then succeed.

🤖 Generated with Claude Code

The .dockerignore file keeps only bin/run.sh from the bin folder, so
bin/analyze.sh is missing from the image and every container fails to
start. bin/run.sh runs the same command, and it is the entrypoint used
by the other Exercism tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iHiD
iHiD requested a review from SleeplessByte as a code owner November 17, 2026 11:46

@SleeplessByte SleeplessByte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now blame who made the earlier change 👀

@SleeplessByte
SleeplessByte merged commit 84fca57 into main Nov 17, 2026
8 checks passed
@SleeplessByte
SleeplessByte deleted the fix-docker-entrypoint branch November 17, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants