-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
52 lines (43 loc) · 1.55 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#use armv7hf compatible OS
FROM balenalib/armv7hf-debian:stretch
#enable building ARM container on x86 machinery on the web (comment out next line if built on Raspberry)
RUN [ "cross-build-start" ]
#labeling
LABEL maintainer="netpi@hilscher.com" \
version="V0.9.2.0" \
description="Raspbian(Debian:stretch) with soft PLC straton from COPA-DATA"
#version
ENV HILSCHERNETPI_STRATON_SOFTPLC 0.9.2.0
#copy files
COPY "./init.d/*" /etc/init.d/
#do installation
RUN apt-get update \
&& apt-get install -y wget unzip \
#create user pi
&& useradd --create-home --shell /bin/bash pi \
&& echo 'pi:raspberry' | chpasswd \
&& adduser pi sudo \
#download straton for raspberry runtime
&& wget -P /tmp/ --no-check-certificate https://www.straton-plc.com/fileadmin/user_upload/Download/straton.9.1.T5LINUX-RaspberryPI.zip \
&& unzip /tmp/straton.9.1.T5LINUX-RaspberryPI.zip -d /tmp/ \
#make runtime executeable
&& chmod +x /tmp/T5LINUX-RaspberryPI/Runtime/t5pi91 \
#move piface2 library
&& cp /tmp/T5LINUX-RaspberryPI/Runtime/libpiface-1.0.so /usr/local/lib \
&& ldconfig \
#move straton runtime
&& cp /tmp/T5LINUX-RaspberryPI/Runtime/t5pi91 /home/pi/ \
#clean up
&& rm -rf /tmp/* \
&& apt-get remove wget unzip \
&& apt-get -yqq autoremove \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/*
#straton port
EXPOSE 1100
#do startscript
ENTRYPOINT ["/etc/init.d/entrypoint.sh"]
#set STOPSGINAL
STOPSIGNAL SIGTERM
#stop processing ARM emulation (comment out next line if built on Raspberry)
RUN [ "cross-build-end" ]