mirror of
https://github.com/thiagoralves/OpenPLC_v3.git
synced 2026-02-06 02:02:20 +08:00
deleted: .DS_Store, this file is part of macOS
modified: Dockerfile, update the file for wiringPi
This commit is contained in:
36
Dockerfile
36
Dockerfile
@@ -1,12 +1,12 @@
|
||||
FROM debian:stable
|
||||
FROM debian:stable-20241111
|
||||
|
||||
COPY . /workdir
|
||||
|
||||
WORKDIR /workdir
|
||||
|
||||
RUN mkdir /docker_persistent
|
||||
RUN mkdir /persistent
|
||||
|
||||
VOLUME /docker_persistent
|
||||
VOLUME /persistent
|
||||
|
||||
# get git, wget, dpkg-dev and gettext
|
||||
RUN apt update && apt install -y \
|
||||
@@ -25,23 +25,27 @@ WORKDIR /api
|
||||
RUN ./build debian \
|
||||
&& apt install -y ./debian-template/wiringpi_3.14_arm64.deb
|
||||
|
||||
# change the directory
|
||||
WORKDIR /workdir
|
||||
|
||||
# setup docker
|
||||
RUN ./install.sh docker \
|
||||
&& touch /docker_persistent/mbconfig.cfg \
|
||||
&& touch /docker_persistent/persistent.file \
|
||||
&& mkdir /docker_persistent/st_files \
|
||||
&& cp /workdir/webserver/openplc.db /docker_persistent/openplc.db \
|
||||
&& 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 /docker_persistent/dnp3.cfg \
|
||||
&& cp /workdir/webserver/dnp3.cfg /persistent/dnp3.cfg \
|
||||
&& mv /workdir/webserver/dnp3.cfg /workdir/webserver/dnp3_default.cfg \
|
||||
&& cp -r /workdir/webserver/st_files/ /docker_persistent/st_files/ \
|
||||
&& cp -r /workdir/webserver/st_files/ /persistent/st_files/ \
|
||||
&& mv /workdir/webserver/st_files /workdir/webserver/st_files_default \
|
||||
&& cp /workdir/webserver/active_program /docker_persistent/active_program \
|
||||
&& cp /workdir/webserver/active_program /persistent/active_program \
|
||||
&& mv /workdir/webserver/active_program /workdir/webserver/active_program_default \
|
||||
&& ln -s /docker_persistent/mbconfig.cfg /workdir/webserver/mbconfig.cfg \
|
||||
&& ln -s /docker_persistent/persistent.file /workdir/webserver/persistent.file \
|
||||
&& ln -s /docker_persistent/openplc.db /workdir/webserver/openplc.db \
|
||||
&& ln -s /docker_persistent/dnp3.cfg /workdir/webserver/dnp3.cfg \
|
||||
&& ln -s /docker_persistent/st_files /workdir/webserver/st_files \
|
||||
&& ln -s /docker_persistent/active_program /workdir/webserver/active_program
|
||||
&& 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"]
|
||||
|
||||
Reference in New Issue
Block a user