forked from jpaffrath/docker-openplc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (23 loc) · 789 Bytes
/
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
31
32
FROM debian:stretch
USER root
WORKDIR /root/
RUN apt-get update && \
apt-get -y install git python-pip autoconf bison build-essential pkg-config bison flex autoconf automake libtool make git python2.7 python-pip sqlite3 cmake sudo
RUN pip install flask flask-login pyserial pymodbus
RUN useradd --create-home --shell /bin/bash openplc
RUN adduser openplc sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER openplc
WORKDIR /home/openplc
RUN git clone https://github.com/thiagoralves/OpenPLC_v3.git
WORKDIR /home/openplc/OpenPLC_v3
RUN sudo ./install.sh custom
RUN sudo apt-get clean
RUN mkdir /home/openplc/scripts
COPY run.sh /home/openplc
RUN sudo chmod +x /home/openplc/run.sh
EXPOSE 502
EXPOSE 8080
EXPOSE 20000
EXPOSE 43628
CMD ["/home/openplc/run.sh"]