From 3963e21b622546a9331c227cc0f4f83938621421 Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Fri, 28 Feb 2025 11:05:47 +0100 Subject: [PATCH] Fix: Image to listen on all hosts --- Dockerfile | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index c0e4f03..e44abcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,36 +1,32 @@ FROM debian:bookworm +USER root + +ENV USER=root + +COPY install.sh /install.sh + +COPY startup.sh /startup.sh + +COPY CODESYSControl.cfg /etc/CODESYSControl.cfg + RUN apt-get update && apt-get install -y \ wget unzip \ - libusb-1.0-0 procps + libusb-1.0-0 procps \ + lsb-base libfontconfig1 libfreetype6 libice6 libsm6 libx11-6 libxcb1 socat ARG CDS_VERSION=4.9.0.0 -# Construct the URL with the variable -RUN mkdir -p /tmp/codesys && \ - echo "https://store-archive.codesys.com/ftp_download/3S/LinuxSL/2302000005/${CDS_VERSION}/CODESYS%20Control%20for%20Linux%20SL%20${CDS_VERSION}.package" > /tmp/codesys/url.txt +ARG EDGE_VERSION=4.9.0.0 -# Download the package -RUN wget --output-document=codesys.package $(cat /tmp/codesys/url.txt) - -# Clean up temporary files -RUN rm -rf /tmp/codesys - -# Continue with unpacking and installation -RUN unzip -p codesys.package '*codemeter*.deb' > codemeter.deb && \ - unzip -p codesys.package '*codesys*.deb' > codesys.deb - -RUN dpkg -i codemeter.deb codesys.deb +RUN bash ./install.sh ${CDS_VERSION} ${EDGE_VERSION} # clean up the apt cache RUN apt-get clean RUN rm -rf /var/lib/apt/lists/* -# Remove Codesys packages -RUN rm -rf codesys.package codesys.deb codemeter.deb - EXPOSE 11740/tcp 11743/tcp 1217/tcp WORKDIR /var/opt/codesys/ -CMD [ "/opt/codesys/bin/codesyscontrol.bin", "/etc/CODESYSControl.cfg" ] +CMD [ "/startup.sh" ]