[
https://issues.apache.org/jira/browse/AIRFLOW-5022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16896042#comment-16896042
]
ASF GitHub Bot commented on AIRFLOW-5022:
-----------------------------------------
ashb commented on pull request #5644: [AIRFLOW-5022] Fixes DockerHook for
registries with port numbers
URL: https://github.com/apache/airflow/pull/5644
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> DockerHook ignores connection port
> ----------------------------------
>
> Key: AIRFLOW-5022
> URL: https://issues.apache.org/jira/browse/AIRFLOW-5022
> Project: Apache Airflow
> Issue Type: Bug
> Components: hooks, operators
> Affects Versions: 1.10.3
> Reporter: Ian Truslove
> Priority: Major
>
> I have a DAG with a DockerOperator whose Docker image is hosted in a private
> registry. Passing a connection with creds to access the registry doesn't work
> - I get access errors like this:
> {{[2019-07-22 18:29:36,734] {{__init__.py:1580 ERROR - 500 Server Error:
> Internal Server Error ("Get
> https://<my.internal.url>:2345/v2/foo/bar/manifests/dd92a47df2f3d2c82775552b765013d3c60a2f34}}\{{:
> denied: access forbidden") }}}}
> and the image is not retrieved.
> I am quite sure I am passing the correct credentials.
> Digging in a bit, I saw that docker_hook doesn't use the connection's _port_
> property. I definitely do have my registry exposed at a non-standard port
> number.
> I hacked a fix directly in to my Airflow, and this does solve the problem.
> I replaced
> {{self.__registry = conn.host}}
> on line 57 of docker_hook.py with
> {{self.__registry = conn.host if conn.port is None else
> f"\{conn.host}:\{conn.port}"}}
>
>
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)