Merge pull request #21 from shrmrf/dockerify

Dockerify
This commit is contained in:
Thiago Alves
2019-01-31 20:53:50 -02:00
committed by GitHub
3 changed files with 165 additions and 56 deletions
+8
View File
@@ -0,0 +1,8 @@
FROM debian
RUN apt-get update && apt-get install -y build-essential pkg-config bison flex autoconf automake libtool make git python2.7 python-pip sqlite3 cmake git
RUN pip install flask flask-login pyserial
COPY . /workdir
RUN cd /workdir && ./install.sh docker
WORKDIR /workdir
ENTRYPOINT ["./start_openplc.sh"]
+33 -15
View File
@@ -4,21 +4,39 @@ The OpenPLC Project consists of three sub-projects:
1. [Runtime](https://github.com/thiagoralves/OpenPLC_v3)
2. [Programming editor](http://www.openplcproject.com/plcopen-editor)
3. [HMI builder](http://www.openplcproject.com/reference-installing-scadabr)
<br/>
To install:
<br/>
## Installation:
```bash
git clone https://github.com/thiagoralves/OpenPLC_v3.git
<br/>
cd OpenPLC_v3
<br/>
./install.sh [platform]
<br/>
where [platform] can be:
<br/>
win - Install OpenPLC on Windows over Cygwin
<br/>
linux - Install OpenPLC on a Debian-based Linux distribution
<br/>
rpi - Install OpenPLC on a Raspberry Pi
<br/>
custom - Skip all specific package installation and tries to install OpenPLC assuming your system already has all dependencies met. This option can be useful if you're trying to install OpenPLC on an unsuported Linux platform or had manually installed all the dependency packages before.
```
Where `[platform]` can be:
`win` - Install OpenPLC on Windows over Cygwin
`linux` - Install OpenPLC on a Debian-based Linux distribution
`docker` - Used by the `Dockerfile` (i.e. doesn't invoke `sudo`)
`rpi` - Install OpenPLC on a Raspberry Pi
`custom` - Skip all specific package installation and tries to install OpenPLC assuming your system already has all dependencies met. This option can be useful if you're trying to install OpenPLC on an unsuported Linux platform or had manually installed all the dependency packages before.
### Building, Installing and Running inside Docker
Make sure [`docker` is installed](https://docs.docker.com/install/linux/docker-ce/ubuntu/)
#### Build
```
# instead of running install.sh as stated above, run:
docker build -t openplc:v3 .
```
#### RUN
_Devices can be passed to the `docker` daemon using the `-v` flag (e.g. `-v /dev/ttyACM0:/dev/ttyACM0`)_
```bash
docker run -it --rm -p 8080:8080 openplc:v3
```
+124 -41
View File
File diff suppressed because it is too large Load Diff