Connection setup Docker container linux #182
Replies: 11 comments
|
You mean how to get TwinCAT to run in a virtual machine? Jakob Sagatowski has a video you might find useful: https://www.youtube.com/watch?v=mbQSRNMJRz8l |
Hello @crishoj Is it possible to create a container on a Linux host without an ads-router? |
I have not tried this myself, but I think it is equivalent to Setup 3 in the diagram here:
|
|
I have done this in the past and it works but requires some work to set up. See the following for some info
Basically your docker network needs to have ADS router running (container like this) with different router port than 48898, e.g. 48900. Then the clients in docker network need to connect to that router, which then forwards packets outside of the docker network. To connect to a different router (port 48900), use settings Unfortunately I don't have any direct example and I don't really have time to create one. |
Hello @jisotalo , |
|
Yes - if I recall correctly. It might be possible to run one ads-client connection directly from docker but I'm not sure. Issue is that the TwinCAT router only accepts loopback connections from localhost, not docker network (it will reject them). That's why the router is usually needed. Again - I might be wrong. I have only used with docker using a separate router inside docker network. |
Hi @jisotalo , |
|
It works with a Docker Linux container without a router in Docker. |
|
Great! Could you please paste the docker and ads-client configs here? It would be super helpful. Thanks! |
dockerfile:docker-compose.ymlindex.jsEdita el archivo en el PLC:
<RemoteConnections>
<Route>
<Name>Docker-Container</Name>
<Address>192.168.0.10</Address>
<NetId>192.168.0.10.1.1</NetId>
<Type>TCP_IP</Type>
</Route>
</RemoteConnections>.env.docker |
|
Thanks! |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I'm looking for documentation on how to create a Docker container on Linux with a small example to communicate with ads-client.
If possible, I'd prefer not to use a ads-router, or is it mandatory to use routing in a Docker container with Linux?
Best regards Víctor.
All reactions