You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/02 09:00:26 UTC

[GitHub] [airflow] alexkruc commented on issue #14809: DockerOperator downloads all image tags in the docker repository

alexkruc commented on issue #14809:
URL: https://github.com/apache/airflow/issues/14809#issuecomment-1172864562

   Hey :) 
   I tried to look at this issue, but I couldn't manage to reproduce it.
   I used the following task definition (similar to the provided example - just changed the command):
   ```python
   task = DockerOperator(
           task_id="dockerized_step",
           image="ubuntu",
           api_version="auto",
           auto_remove=True,
           command="date",
           network_mode="bridge",
           force_pull=True,
           dag=dag
       )
   ```
   And I see that Airflow downloaded only one single digest:
   ![image](https://user-images.githubusercontent.com/36231027/176993786-060edc11-3b6f-4382-98ba-bfe4e3d44aa2.png)
   Also, I tried it with several other images than `ubuntu`, and it's always was the same result - only 1 image was downloaded.
   Here is the output from the `docker images` command as well, we can see there that there is a single image for `ubuntu`:
   ```bash
   ╭─ ~
   ╰─❯ docker images | grep -i ubuntu
   ubuntu                                                         latest                                  27941809078c   3 weeks ago      77.8MB
   ```
   
   I don't know why it's fixed now, but I noticed that the constraints version for Docker API that was used on version 2.0 (the reported version) was [docker==3.7.3](https://github.com/apache/airflow/blob/constraints-2-0/constraints-3.8.txt#L189). Since versions >2.2, Airflow is using [docker==5.0.3](https://github.com/apache/airflow/blob/constraints-2-2/constraints-3.8.txt#L220), this might be what "solved" this issue, or some other feature that was pushed to `DockerOperator`..
   
   In any case, if the issue proceeds, can someone post here a reproducible example? From my exploration, everything seems to work as expected :) 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org