Skip to content

Commit de06748

Browse files
authored
Rejig the Python copy commands (#603)
A small change to func.py can peturb a potentially larger layer containing required libraries; shift the copy around to avoid this. Add /function to the PYTHONPATH - this permits adding small sets of other modules in a cheap & cheerful fashion alongside the func.py
1 parent b88c8e4 commit de06748

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

langs/python.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ def handler(ctx, data: io.BytesIO=None):
118118

119119
func (h *PythonLangHelper) DockerfileCopyCmds() []string {
120120
return []string{
121-
"COPY --from=build-stage /function /function",
122121
"COPY --from=build-stage /python /python",
123-
"ENV PYTHONPATH=/python",
122+
"COPY --from=build-stage /function /function",
123+
"ENV PYTHONPATH=/function:/python",
124124
}
125125
}

0 commit comments

Comments
 (0)