From 33940446581be4a3aa9861ee0b03455e1d9394cf Mon Sep 17 00:00:00 2001 From: Guillaume Giraudon Date: Mon, 27 May 2024 20:58:20 +0000 Subject: [PATCH 1/2] active_program should be part of persistent storage in dockers --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 363c4c8..f5d7622 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,17 +6,19 @@ VOLUME /persistent RUN ./install.sh docker RUN touch /persistent/mbconfig.cfg RUN touch /persistent/persistent.file +RUN touch /persistent/active_program RUN mkdir /persistent/st_files RUN cp /workdir/webserver/openplc.db /persistent/openplc.db RUN mv /workdir/webserver/openplc.db /workdir/webserver/openplc_default.db RUN cp /workdir/webserver/dnp3.cfg /persistent/dnp3.cfg RUN mv /workdir/webserver/dnp3.cfg /workdir/webserver/dnp3_default.cfg RUN cp /workdir/webserver/st_files/* /persistent/st_files -run mv /workdir/webserver/st_files /workdir/webserver/st_files_default +RUN mv /workdir/webserver/st_files /workdir/webserver/st_files_default RUN ln -s /persistent/mbconfig.cfg /workdir/webserver/mbconfig.cfg RUN ln -s /persistent/persistent.file /workdir/webserver/persistent.file RUN ln -s /persistent/openplc.db /workdir/webserver/openplc.db RUN ln -s /persistent/dnp3.cfg /workdir/webserver/dnp3.cfg RUN ln -s /persistent/st_files /workdir/webserver/st_files +RUN ln -s /persistent/active_program /workdir/webserver/active_program ENTRYPOINT ["./start_openplc.sh"] From 821bd0c497f6f0c095b0c035460bbae4f8571574 Mon Sep 17 00:00:00 2001 From: Guillaume Giraudon Date: Mon, 27 May 2024 21:17:37 +0000 Subject: [PATCH 2/2] Move active_program file instead of creating it --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f5d7622..e67d5af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,6 @@ VOLUME /persistent RUN ./install.sh docker RUN touch /persistent/mbconfig.cfg RUN touch /persistent/persistent.file -RUN touch /persistent/active_program RUN mkdir /persistent/st_files RUN cp /workdir/webserver/openplc.db /persistent/openplc.db RUN mv /workdir/webserver/openplc.db /workdir/webserver/openplc_default.db @@ -14,6 +13,8 @@ RUN cp /workdir/webserver/dnp3.cfg /persistent/dnp3.cfg RUN mv /workdir/webserver/dnp3.cfg /workdir/webserver/dnp3_default.cfg RUN cp /workdir/webserver/st_files/* /persistent/st_files RUN mv /workdir/webserver/st_files /workdir/webserver/st_files_default +RUN cp /workdir/webserver/active_program /persistent/active_program +RUN mv /workdir/webserver/active_program /workdir/webserver/active_program_default RUN ln -s /persistent/mbconfig.cfg /workdir/webserver/mbconfig.cfg RUN ln -s /persistent/persistent.file /workdir/webserver/persistent.file RUN ln -s /persistent/openplc.db /workdir/webserver/openplc.db