-
Notifications
You must be signed in to change notification settings - Fork 458
[DRAFT] adding python313 dockerfile locally #4611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[DRAFT] adding python313 dockerfile locally #4611
Conversation
if (dockerImage == Constants.DockerImages.LinuxPython313ImageAmd64) | ||
{ | ||
// creating temp folder for Dockerfile | ||
string tempDir = Path.Combine(Path.GetTempPath(), "python313-docker"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets name folder python313-buildenv-docker
?
@@ -500,8 +500,20 @@ private static async Task RestorePythonRequirementsDocker(string functionAppRoot | |||
dockerImage = await ChoosePythonBuildEnvImage(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this (ChoosePythonBuildEnvImage) should handle returning the local docker file name.
public const string LinuxPython313ImageAmd64 = "mcr.microsoft.com/azure-functions/python:4-python3.13-buildenv";
Can be replaced with something like local/python3.13-buildenv
ChoosePythonBuildEnvImage
can be updated to return a tuple: imageName, isLocal
Then here below on line 503, we can check ifLocal = true and handle the image that way - this makes it more generic and not just for 313
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a quick thought - feel free to clean this up for something that makes more sense but the change should ensure we make these changes easy to expand on in future
if (dockerImage == Constants.DockerImages.LinuxPython313ImageAmd64) | ||
{ | ||
// creating temp folder for Dockerfile | ||
string tempDir = Path.Combine(Path.GetTempPath(), "python313-docker"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code in this block and be broken out into its own method i.e. BuildLocalDockerImage(imageName)
And find a way to connect image name to the static resource.
Code in here should be generic for any local build docker image and not just for DockerfilePython313buildenv
Issue describing the changes in this PR
resolves #issue_for_this_pr
Pull request checklist
release_notes.md
Additional information
Additional PR information