So what I'm looking for is some way to build my PLC project in a Docker Container for a nice and easy CI/CD.
From what I found online it is not possible to perform a command line compilation of Beckhoff TwinCAT.
I did find this post on stackoverflow:
TwinCAT3 build on Jenkins
But this requires devenv.exe which is not provided in build tools.
Anyone got a way of building my project within docker?
Building a TwinCAT PLC project programmatically can be done using the TwinCAT automation interface although it is not trivial. This is what is discussed in the post you linked. You must install TwinCAT XAE and then write a (C#) program that builds and deploys your PLC project. I wrote such a program for my customers.
Because a PLC program has real-time requirements it cannot run everywhere. It does not run in Windows but besides Windows such that it can meet its RT requirements. This Windows/TwinCAT combination only runs in specific virtualization platforms/modes. I ran TwinCAT PLC projects in Windows Server Hyper-V and VMware for my customers. You probably will have to run docker on Windows Server Hyper-V in Hyper-V isolation mode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With