[
https://issues.apache.org/jira/browse/AIRFLOW-5022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16896430#comment-16896430
]
ASF subversion and git services commented on AIRFLOW-5022:
----------------------------------------------------------
Commit c202774ce369a568ab5d5d52d68c5e376cec789f in airflow's branch
refs/heads/v1-10-test from Ian Truslove
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=c202774 ]
[AIRFLOW-5022] Fix DockerHook for registries with port numbers (#5644)
`DockerHook` was failing to authenticate with private Docker
registries if the registry's `Connection` specified a non-standard
port number.
(cherry picked from commit 6d34ce291cf93e15c8bfae0e0ff5aba11229d43b)
> 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
> Fix For: 1.10.4
>
>
> 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)