Are there any guides on using Codesys containers in Docker? I am new in using Docker and containers in general, but I understand the main points of it.
You can start it in the container simply with the command "codesys
build-test". While it worked locally, I didn't get it to run in my
productive environment. But this was related to Drone, which I used as a
test runner.
To answer your last question first:
You need no input. The commands are designed, they are crunching through all files recursively. The reason for this "weired" design is the main use case, for which I designed them:
"Execute easy build tasks" So a command might look like "codesys compile-library" , and it operates on the whole repo (magically).
Checkout this documentation, to understand the idea: https://forge.codesys.com/forge/wiki/Continuous%20Integration/
So, maybe you now also got an idea on how I use the containers.
Drone is mounting the repository as a volume to a folder
The working directory is already this folder
And I execute the commands like shown above
If I can help you more, continue to ask.
If it is a specific question, just ask this.
If you have more general problems in understanding my stuff, I will need a bit more information about your current status.
And I want to boost the idea of @hermsen . It would be terribly interesting for many of us, if you could write a nice blog post about your solution. Maybe it's still too early. But when you are ready and you need some help to publish it, feel free to ask for support.
Last edit: Ingo 2021-04-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Ingo!
I started to realize your design after deciphering the "codesys" bash script in the codesys-ide folder and the "run" script in the Test folder.
I'll review the wiki link.
I'll be sure to post about the journey when I get proficient with the tools.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe you would be so kind and write up a blog of your progress? We would love to see such a project/story/blog in CForge! Plus, if you encounter some difficulties we can help.
π
1
Last edit: hermsen 2021-04-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wanted to reach out and see if anyone has had issues with building the codesys-ide image? When I run my docker build command it gets hung up in the install2.sh file. I am able to build and run the codesys-runtime container but not the ide. I am running docker on Debian version 11. Any help would be greatly appreciated.
Thanks!
π
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Are there any guides on using Codesys containers in Docker? I am new in using Docker and containers in general, but I understand the main points of it.
I found the Codesys-4-Linux container, but I'm not sure where to start in using it. https://forge.codesys.com/tol/codesys-4-linux/docker/ci/master/tree/
I am familiar with Codesys and I would like to utilize Codesys containers on a server to run automated tests via Cfunit.
Any info would be greatly appreciated.
more posts ...
First question is, if you want to run the CODESYS IDE or the CODESYS Control Runtime (the PLC) in a container.
For the IDE:
https://forge.codesys.com/tol/codesys-4-linux/home/Home/#ide
For the Runtime:
https://forge.codesys.com/trg/linux-sl/
But those are just the images. To learn how to use them, you need more docker experience.
I'm currently going through this tutorial: https://docker-curriculum.com/
Also, I just found this page: https://forge.codesys.com/tol/codesys-4-linux/home/Home/ which is helpful, thank you Ingo for making it.
I'm expecting to use just the IDE in the following way:
For the case described above, I would only need to use the "codesys-IDE" container correct?
I'll go through the repo and figure out how everything works.
Thanks for making the Docker container!
Last edit: aone 2021-04-11
Yes, exactly! In combination with cfUnit, I also experienced with this
script
https://forge.codesys.com/tol/codesys-4-linux/docker/ci/master/tree/codesys-ide/scripts/build-test.py
You can start it in the container simply with the command "codesys
build-test". While it worked locally, I didn't get it to run in my
productive environment. But this was related to Drone, which I used as a
test runner.
This command builds a boot app, which I then started with this script:
https://forge.codesys.com/tol/codesys-4-linux/docker/ci/master/tree/codesys-ide/codesyscontrol
Yes, and you're welcome! π
Hello Ingo,
Do you have a an example work flow for using the Codesys-IDE container?
I am having a difficult time understanding what inputs or prerequisites are required in order to use commands like "build-test" or "compile-library".
For instance, what inputs are expected after this command? A path to a .project file on the host computer?
Last edit: aone 2021-04-13
To answer your last question first:
You need no input. The commands are designed, they are crunching through all files recursively. The reason for this "weired" design is the main use case, for which I designed them:
"Execute easy build tasks" So a command might look like "codesys compile-library" , and it operates on the whole repo (magically).
Checkout this documentation, to understand the idea:
https://forge.codesys.com/forge/wiki/Continuous%20Integration/
So, maybe you now also got an idea on how I use the containers.
If I can help you more, continue to ask.
If it is a specific question, just ask this.
If you have more general problems in understanding my stuff, I will need a bit more information about your current status.
And I want to boost the idea of @hermsen . It would be terribly interesting for many of us, if you could write a nice blog post about your solution. Maybe it's still too early. But when you are ready and you need some help to publish it, feel free to ask for support.
Last edit: Ingo 2021-04-14
Thanks Ingo!
I started to realize your design after deciphering the "codesys" bash script in the codesys-ide folder and the "run" script in the Test folder.
I'll review the wiki link.
I'll be sure to post about the journey when I get proficient with the tools.
To clarify, you need to use Drone CI/CD (or another CI/CD tool) in order to utilize the Codesys containers, correct?
That's the main use case, but it might also be helpful in other scenarios.
Maybe you would be so kind and write up a blog of your progress? We would love to see such a project/story/blog in CForge! Plus, if you encounter some difficulties we can help.
Last edit: hermsen 2021-04-12
I'll document my journey. I'm looking through the repo in order to reduce trivial questions. I appreciate all the help.
I'll pose questions here when I put in my due diligence.
Hi everyone,
I wanted to reach out and see if anyone has had issues with building the codesys-ide image? When I run my docker build command it gets hung up in the install2.sh file. I am able to build and run the codesys-runtime container but not the ide. I am running docker on Debian version 11. Any help would be greatly appreciated.
Thanks!
I had an issue aswell, I was trying to use docker and got stuck on the specific line ' Downloading https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe' within install2.sh - which is actually from the https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks, winetricks_selfupdate(). Would love to know if anyone has a known solution. Only other thing I can think is to download winetricks +.net, update the winetricks to point to the downloaded .net? Granted Im not too savy with Docker so I have been struggling on figuring that part out- would love any suggestions!