Skip to content

Fix 3.12 Dockerfile: install findutils and use module-name handler - #10

Merged
m-messer merged 2 commits into
mainfrom
python-3.12-dockerfile-fixes
Nov 6, 2026
Merged

m-messer merged 2 commits into
mainfrom
python-3.12-dockerfile-fixes

Conversation

@m-messer

@m-messer m-messer commented Nov 6, 2026

Copy link
Copy Markdown
Member

Follow-up to #9. These two commits were pushed to the python-3.12 branch after #9 had already merged, so they never reached main. As things stand, a function created from this template fails to build, and if it did build it would crash on startup.

Changes (app/Dockerfile only)

  • Install findutils. The 3.12 Lambda image is Amazon Linux 2023, which doesn't include find, so RUN chmod 644 $(find . -type f) fails with find: command not found.
  • CMD [ "app.handler" ] with ENV PYTHONPATH=/app. Python 3.12's Lambda runtime imports the handler by module name, so CMD [ "/app/app.handler" ] becomes import_module(".app.app") and crashes on startup (every request returns 500).
  • Install pytest for the healthcheck.

This matches compareExpressions, and the same Dockerfile is deployed and working on ArraySymbolicEqual staging (lambda-feedback/ArraySymbolicEqual#20), with the healthcheck passing.

Testing

The template's tests pass on Python 3.12 (2 passed). I couldn't build the Docker image locally; ArraySymbolicEqual's staging deploy built the same Dockerfile.

🤖 Generated with Claude Code

m-messer and others added 2 commits November 6, 2026 12:17
The Python 3.12 Lambda base image is Amazon Linux 2023, which doesn't
include find, so the chmod step fails with 'find: command not found'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Python 3.12's Lambda runtime imports the handler as a module name, so
CMD /app/app.handler crashes on startup. Use CMD app.handler with
PYTHONPATH=/app, as compareExpressions does, and install pytest for
the healthcheck.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@m-messer
m-messer merged commit 324363f into main Nov 6, 2026
1 check passed
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.

1 participant