--- a/codesys-ide/Dockerfile +++ b/codesys-ide/Dockerfile @@ -1,12 +1,14 @@ # -# Stage 1: -# Install CODESYS in debian stretch with wine-development version +# Install CODESYS in debian buster with wine-development version +# Note: We sometimes need to switch users from "wineuser" to root and back. +# The reason is, that things inside linux need to be installed as root, +# while things inside of wine, need to be installed as wineuser. # FROM debian:buster RUN dpkg --add-architecture i386 RUN apt-get update && \ - apt-get install -y wine32-development wine64-development wget subversion winbind python-requests cabextract msitools xvfb xdotool jwm procps + apt-get install -y wine32-development wine64-development wget subversion winbind python-requests cabextract msitools xvfb xdotool jwm procps multiarch-support RUN useradd -ms /bin/bash wineuser @@ -25,10 +27,21 @@ RUN ./install2.sh --silent; \ test -f /home/wineuser/.wine.cds/drive_c/CODESYS/CODESYS/Common/CODESYS.exe +# Add automation scripts, which can be used for CI/CD jobs ADD codesys /usr/local/bin/codesys +ADD codesyscontrol /usr/local/bin/codesyscontrol ADD scripts /usr/local/share/codesys + +# Install Linux SL package (in IDE and the runtime) +RUN codesys install https://store.codesys.com/ftp_download/3S/LinuxSL/2302000005/3.5.16.0/CODESYS%20Control%20for%20Linux%20SL%203.5.16.0.package + +USER root +RUN dpkg -i "/home/wineuser/.wine.cds/drive_c/users/wineuser/CODESYS Control for Linux SL/Dependency/codemeter-lite_7.0.3918.500_amd64.deb" +RUN dpkg -i "/home/wineuser/.wine.cds/drive_c/users/wineuser/CODESYS Control for Linux SL/Delivery/codesyscontrol_x64_linux_V3.5.16.0.deb" + USER wineuser + # basic test of the image RUN codesys test