Debian container with CODESYS control runtime and Edge connector installation
1.9K
Currently, we have information indicating that licensing of CODESYS running in a container is not supported by the current version of CODESYS runtime.
CODESYS© control runs on different kinds of devices and its runtime is compatible with different processor architectures. On the official CODESYS store, the company CODESYS offers users links to precompiled runtimes and executables for different processor architectures that are ready-to-download and -use. Not only runtimes but extension packages are provided in the store as well. With the correct links, they can also be downloaded electronically from an FTP server. To get CODESYS running on your device, you can build a container yourself and run it or deploy a pre-built container from a repository.
To build a container yourself you need to include the following packages from the CODESYS FTP server:
If you are familiar with building containers, you can easily build a container yourself in minutes on a device using a Dockerfile.
An example of a Dockerfile to build a container for ARM64 architecture based systems is shown below. The environment variables CDS_VERSION and EDGE_VERSION define the package versions loaded from the FTP server.
FROM arm64v8/debian:11.6
RUN apt-get update
RUN apt-get install -y wget sudo unzip libusb-1.0-0-dev procps
ENV CDS_VERSION "4.7.0.0"
ENV EDGE_VERSION "4.7.0.0"
ENV URL "https://store-archive.codesys.com/ftp_download/3S/LinuxARM64/2302000039/$CDS_VERSION/CODESYS%20Control%20for%20Linux%20ARM64%20SL%20$CDS_VERSION.package"
ENV EDGE_URL "https://store-archive.codesys.com/ftp_download/3S/EdgeGatewayLinux/000120/$EDGE_VERSION/CODESYS%20Edge%20Gateway%20for%20Linux%20$EDGE_VERSION.package"
RUN wget --output-document=/tmp/codesys.package $URL && \
unzip -p /tmp/codesys.package '*codemeter*.deb' > /tmp/codemeter.deb && dpkg -i /tmp/codemeter.deb && \
unzip -p /tmp/codesys.package '*codesyscontrol*.deb' > /tmp/codesys.deb && dpkg -i /tmp/codesys.deb
RUN wget --output-document=/tmp/edge.package $EDGE_URL && \
unzip -p /tmp/edge.package '*arm64.deb' > /tmp/edge.deb && dpkg -i /tmp/edge.deb
EXPOSE 11740 1217 11743
ENTRYPOINT ["/bin/sh", "-c" , "/etc/init.d/codesyscontrol start && /etc/init.d/codesysedge start && tail -f /dev/null"]
If you want to create the container for an AMD64 architecture based system for example, modify the following lines to
FROM amd64v8/debian:11.6
...
ENV URL "https://store-archive.codesys.com/ftp_download/3S/LinuxSL/2302000005/$CDS_VERSION/CODESYS%20Control%20for%20Linux%20SL%20$CDS_VERSION.package"
...
unzip -p /tmp/edge.package '*amd64.deb' > /tmp/edge.deb && dpkg -i /tmp/edge.deb
This repositry hosts containers of different CODESYS runtime versions that are all built using the dockerfile example above.
To deploy a container simply call the following line (replace the 'x' with the container tag you want to deploy)
docker run -it -d -v codesys_data:/var/opt/codesys --network=host --privileged --name=codesys_control_sl_linux hilschernetiotedge/codesys_control_sl_linux:4.x.0.0
It is important to run the container in the modes 'host' and 'privileged', since it needs access to host device specific system variables.
Once the container is deployed, the CODESYS runtime can be programmed with the CODESYS development system V3 (for Windows). The progamming port 1217 (Edge gateway) is exposed.
Without a license the CODESYS runtime in the container runs for 2 hours only and then stops. It gives you enough time to test the runtime intensively. Else restart the container and continue testing.
IMPORTANT NOTE! During the licensing procedure the license will be stored within the context of the container. If you stop and delete the container then your license is lost forever. So make sure you saved the license file through the CODESYS development system before or use the docker commit command to create a 1:1 container image backup copy of your currently running container inclusive the license.
HILSCHER DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT DEFECTS IN THE SOFTWARE WILL BE CORRECTED BY THE 3RD PARTY COMPANY.
Content type
Image
Digest
sha256:b0d56dcda…
Size
213.6 MB
Last updated
almost 3 years ago
docker pull hilschernetiotedge/codesys_control_sl_linux:4.9.0.0