forked from aws/aws-sam-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract full file name from Dockerfile path (aws#4360)
* Extract full file name from Dockerfile path Using `.name` here instead of `.stem` will ensure that the entire file name is returned including any and all extensions. * Add unit test for Dockerfile with extension * Add dockerfile extension integration test This test will verify that a function can be built and invoked when the Dockerfile contains a suffix/extension in the file name. Co-authored-by: Wing Fung Lau <[email protected]>
- Loading branch information
1 parent
bb30dba
commit fa26bff
Showing
4 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
15 changes: 15 additions & 0 deletions
15
tests/integration/testdata/buildcmd/PythonImage/Dockerfile.production
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ARG BASE_RUNTIME | ||
|
||
FROM public.ecr.aws/lambda/python:$BASE_RUNTIME | ||
|
||
ARG FUNCTION_DIR="/var/task" | ||
|
||
RUN mkdir -p $FUNCTION_DIR | ||
|
||
COPY main.py $FUNCTION_DIR | ||
|
||
COPY __init__.py $FUNCTION_DIR | ||
COPY requirements.txt $FUNCTION_DIR | ||
|
||
RUN python -m pip install -r $FUNCTION_DIR/requirements.txt -t $FUNCTION_DIR | ||
|
This file contains 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