Skip to content

Commit 2236faa

Browse files
Merge pull request #32 from fledge-iot/FOGL-5142
Added Dockerfile for ubuntu20 and renamed Dockerfile of ubuntu18
2 parents cb40be4 + 6749745 commit 2236faa

File tree

3 files changed

+54
-4
lines changed

3 files changed

+54
-4
lines changed
File renamed without changes.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
FROM ubuntu:20.04
2+
3+
LABEL maintainer="[email protected]"
4+
5+
ENV ARCHITECTURE="x86_64"
6+
ENV OS="ubuntu2004"
7+
8+
ARG PKG_VERSION="latest"
9+
10+
ENV FLEDGE_PKGS_ARCHIVES_LINK="http://archives.fledge-iot.org/${PKG_VERSION}/${OS}/${ARCHITECTURE}/"
11+
12+
# Install pre-requisites
13+
RUN apt-get update && \
14+
apt-get install -y rsyslog curl wget jq nginx-light software-properties-common
15+
16+
17+
# Fake service control as docker container doesn't use it
18+
RUN printf '#!/bin/bash \nexit 0' > /usr/bin/systemctl
19+
RUN chmod 755 /usr/bin/systemctl
20+
21+
# Install Fledge repo within container
22+
RUN wget -q -O - http://archives.fledge-iot.org/KEY.gpg | apt-key add - && \
23+
add-apt-repository "deb ${FLEDGE_PKGS_ARCHIVES_LINK} / "
24+
25+
# Install fledge
26+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y fledge
27+
28+
# Fix and install fledge-gui
29+
RUN apt-get download fledge-gui && \
30+
dpkg --unpack fledge-gui*.deb && \
31+
sed -i 's/grep/echo/g' /var/lib/dpkg/info/fledge-gui.postinst && \
32+
dpkg --configure fledge-gui
33+
34+
# Build the Start Script
35+
RUN echo "service rsyslog start" > start.sh && \
36+
echo "service nginx start" >> start.sh && \
37+
echo "/usr/local/fledge/bin/fledge start" >> start.sh && \
38+
echo "tail -f /var/log/syslog" >> start.sh && \
39+
chmod +x start.sh
40+
41+
RUN usermod -aG www-data root
42+
43+
ENV FLEDGE_ROOT=/usr/local/fledge
44+
45+
# VOLUME /usr/local/fledge/data
46+
47+
# Fledge API and Fledge GUI ports
48+
EXPOSE 8081 1995 80
49+
50+
CMD ["bash", "./start.sh"]

docker/latest/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
### Build fledge image
1+
### Build fledge Ubuntu 18.04 image
22

33
```
4-
$ docker build --no-cache --tag fledge:latest .
4+
$ docker build --no-cache --tag fledge:latest -f Dockerfile.ubuntu1804 .
55
```
66

7-
Default will be built with latest stable relase.
7+
Default image will be built with latest stable relase.
88

99
```
10-
$ docker build --tag fledge:nightly --build-arg PKG_VERSION=nightly .
10+
$ docker build --tag fledge:nightly --build-arg PKG_VERSION=nightly -f Dockerfile.ubuntu1804 .
1111
```
1212

1313

0 commit comments

Comments
 (0)