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

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

Fixed by https://github.com/apache/camel/pull/29107 (merged as c885344db813), 
in 4.24.0.

_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