uranusjr commented on code in PR #26951:
URL: https://github.com/apache/airflow/pull/26951#discussion_r993171775


##########
airflow/providers/docker/operators/docker.py:
##########
@@ -304,10 +311,13 @@ def _run_image_with_mounts(self, target_mounts, 
add_tmp_variable: bool) -> list[
             docker_log_config['max-size'] = self.log_opts_max_size
         if self.log_opts_max_file is not None:
             docker_log_config['max-file'] = self.log_opts_max_file
+        env_file_vars = {}
+        if self.env_file is not None:
+            env_file_vars = self.unpack_environment_variables(self.env_file)
         self.container = self.cli.create_container(
             command=self.format_command(self.command),
             name=self.container_name,
-            environment={**self.environment, **self._private_environment},
+            environment={**self.environment, **self._private_environment, 
**env_file_vars},

Review Comment:
   Me either, I’d say just go with instincts šŸ˜› Your suggested code looks good 
to me. (But the behaviour should be documented not matter what is chosen.)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to