-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Improve insert content when generate docker file #60393
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
Improve insert content when generate docker file #60393
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
jscheffl
left a comment
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.
Good catch!
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
(cherry picked from commit fd90666) Co-authored-by: Tuan Hoang Minh <9130269+tuanhm2911@users.noreply.github.com>
What
When inserting scripts into Dockerfiles, the file write function is currently called inside a loop, causing the file to be written line by line.
Proposal
Move the file write operation outside the loop so the content is written only once. This reduces unnecessary I/O operations and improves execution time.