[ 
https://issues.apache.org/jira/browse/CAMEL-26511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137283#comment-18137283
 ] 

Claus Ibsen commented on CAMEL-26511:
-------------------------------------

PR: https://github.com/apache/camel/pull/29107

Both points are fixed there:
* The documented default of {{socket}} (endpoint option, component option and 
the {{CamelDockerSocketEnabled}} header) is now {{false}}, which is what the 
component has always done. The history points this way: {{defaultValue = 
"true"}} came with CAMEL-10307 but the field never defaulted to true (and 
socket mode could not work then), and CAMEL-13526 made the socket opt-in with 
the host as the socket path. So the effective default stays TCP and there is no 
upgrade guide entry.
* In socket mode the default host {{localhost}} now means 
{{/var/run/docker.sock}}, so {{docker:info?socket=true}} works. Any other host 
is the socket path, as before. The docs say so.

Not changed: making the socket the default. It would be friendlier for a local 
daemon, but it changes how every existing route connects; it should be its own 
change with an upgrade guide entry if wanted.

_Claude Code on behalf of Claus Ibsen (davsclaus)_

> camel-docker - the socket option defaults to false although documented as 
> true, and socket mode with the default host gives unix://localhost
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26511
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26511
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-docker
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> Found while fixing CAMEL-26191. The socket connection mode of camel-docker 
> does not work as documented.
> * {{DockerConfiguration.socket}} is documented with {{defaultValue = "true"}} 
> (endpoint option, and the {{CamelDockerSocketEnabled}} header in 
> {{DockerConstants}}), but the field is a plain {{boolean}} that defaults to 
> {{false}}. So by default the component connects to {{tcp://localhost:2375}} 
> (the unencrypted TCP port of the daemon, which Docker does not open by 
> default), not to the local socket.
> * With {{socket=true}}, {{DockerClientProfile.toUrl()}} builds 
> {{unix://<host>}}. With the default {{host=localhost}} that is 
> {{unix://localhost}}, which cannot connect (Netty: {{connect(..) failed 
> error(-22) Invalid argument}}). It only works when {{host}} is set to the 
> socket path, such as {{/var/run/docker.sock}}, which the docs do not say.
> To decide: make the documented default true and use {{/var/run/docker.sock}} 
> when the socket mode is on and host is the default {{localhost}}; or keep TCP 
> as the default and fix the documented default to false. Either way the docs 
> should say that in socket mode {{host}} is the path of the socket. 
> Upgrade-guide entry if the default changes.
> _Claude Code on behalf of Claus Ibsen (davsclaus)_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to