File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM ubuntu:18.04
2
+
3
+ LABEL maintainer="
[email protected] "
4
+
5
+ ENV ARCHITECTURE="aarch64"
6
+ ENV OS="ubuntu1804"
7
+
8
+ # v1.9.2 onwards only
9
+ ARG PKG_VERSION="latest"
10
+
11
+ ENV FLEDGE_PKGS_ARCHIVES_LINK="http://archives.fledge-iot.org/${PKG_VERSION}/${OS}/${ARCHITECTURE}/"
12
+
13
+ # Install pre-requisites
14
+ RUN apt-get update && \
15
+ apt-get install -y rsyslog curl wget jq nginx-light software-properties-common
16
+
17
+
18
+ # Fake service control as docker container doesn't use it
19
+ RUN printf '#!/bin/bash \nexit 0' > /usr/bin/systemctl
20
+ RUN chmod 755 /usr/bin/systemctl
21
+
22
+ # Install Fledge repo within container
23
+ RUN wget -q -O - http://archives.fledge-iot.org/KEY.gpg | apt-key add - && \
24
+ add-apt-repository "deb ${FLEDGE_PKGS_ARCHIVES_LINK} / "
25
+
26
+ # Install fledge
27
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y fledge
28
+
29
+ # Install fledge-gui
30
+ RUN apt-get install -y fledge-gui
31
+
32
+ # Build the Start Script
33
+ RUN echo "service rsyslog start" > start.sh && \
34
+ echo "service nginx start" >> start.sh && \
35
+ echo "/usr/local/fledge/bin/fledge start" >> start.sh && \
36
+ echo "tail -f /var/log/syslog" >> start.sh && \
37
+ chmod +x start.sh
38
+
39
+ RUN usermod -aG www-data root
40
+
41
+ ENV FLEDGE_ROOT=/usr/local/fledge
42
+
43
+ # VOLUME /usr/local/fledge/data
44
+
45
+ # Fledge API and Fledge GUI ports
46
+ EXPOSE 8081 1995 80
47
+
48
+ CMD ["bash", "./start.sh"]
You can’t perform that action at this time.
0 commit comments