Skip to content
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

Allow DockerOperator's image to be templated #19997

Merged
merged 1 commit into from
Dec 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions airflow/providers/docker/operators/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class DockerOperator(BaseOperator):
be provided with the parameter ``docker_conn_id``.

:param image: Docker image from which to create the container.
If image tag is omitted, "latest" will be used.
If image tag is omitted, "latest" will be used. (templated)
:type image: str
:param api_version: Remote API version. Set to ``auto`` to automatically
detect the server's version.
Expand Down Expand Up @@ -152,7 +152,7 @@ class DockerOperator(BaseOperator):
:type retrieve_output_path: Optional[str]
"""

template_fields = ('command', 'environment', 'container_name')
template_fields = ('image', 'command', 'environment', 'container_name')
template_ext = (
'.sh',
'.bash',
Expand Down