Repository navigation
Fix 3.12 Dockerfile: install findutils and use module-name handler - #10
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #9. These two commits were pushed to the
python-3.12branch after #9 had already merged, so they never reachedmain. As things stand, a function created from this template fails to build, and if it did build it would crash on startup.Changes (
app/Dockerfileonly)findutils. The 3.12 Lambda image is Amazon Linux 2023, which doesn't includefind, soRUN chmod 644 $(find . -type f)fails withfind: command not found.CMD [ "app.handler" ]withENV PYTHONPATH=/app. Python 3.12's Lambda runtime imports the handler by module name, soCMD [ "/app/app.handler" ]becomesimport_module(".app.app")and crashes on startup (every request returns 500).pytestfor 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