-
Notifications
You must be signed in to change notification settings - Fork 447
/
Dockerfile
30 lines (24 loc) · 1.26 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM debian:bullseye-20240722
COPY . /workdir
WORKDIR /workdir
RUN mkdir /persistent
VOLUME /persistent
RUN ./install.sh docker \
&& touch /persistent/mbconfig.cfg \
&& touch /persistent/persistent.file \
&& mkdir /persistent/st_files \
&& cp /workdir/webserver/openplc.db /persistent/openplc.db \
&& mv /workdir/webserver/openplc.db /workdir/webserver/openplc_default.db \
&& cp /workdir/webserver/dnp3.cfg /persistent/dnp3.cfg \
&& mv /workdir/webserver/dnp3.cfg /workdir/webserver/dnp3_default.cfg \
&& cp -r /workdir/webserver/st_files/ /persistent/st_files/ \
&& mv /workdir/webserver/st_files /workdir/webserver/st_files_default \
&& cp /workdir/webserver/active_program /persistent/active_program \
&& mv /workdir/webserver/active_program /workdir/webserver/active_program_default \
&& ln -s /persistent/mbconfig.cfg /workdir/webserver/mbconfig.cfg \
&& ln -s /persistent/persistent.file /workdir/webserver/persistent.file \
&& ln -s /persistent/openplc.db /workdir/webserver/openplc.db \
&& ln -s /persistent/dnp3.cfg /workdir/webserver/dnp3.cfg \
&& ln -s /persistent/st_files /workdir/webserver/st_files \
&& ln -s /persistent/active_program /workdir/webserver/active_program
ENTRYPOINT ["./start_openplc.sh"]