Skip to content

Commit 595c2d8

Browse files
authored
Update Dockerfile
Using Apline & remake of dockerfile
1 parent b18977c commit 595c2d8

1 file changed

Lines changed: 38 additions & 24 deletions

File tree

Dockerfile

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,53 @@
1-
FROM resin/armv7hf-debian:stretch
1+
FROM alpine:latest
22

33
# Build environment variables
4-
ENV MON_VER=0.1.675 \
4+
ENV VER=0.0.8 \
55
CREATED="BLOODY2k" \
6-
MON_OPT=""
6+
MON_OPT="" \
7+
PREF_ARRIVAL_SCAN_ATTEMPTS=1 \
8+
PREF_DEPART_SCAN_ATTEMPTS=2 \
9+
PREF_BEACON_EXPIRATION=240 \
10+
PREF_MINIMUM_TIME_BETWEEN_SCANS=15 \
11+
PREF_PASS_FILTER_ADV_FLAGS_ARRIVE=".*" \
12+
PREF_PASS_FILTER_MANUFACTURER_ARRIVE=".*" \
13+
PREF_FAIL_FILTER_ADV_FLAGS_ARRIVE="NONE" \
14+
PREF_FAIL_FILTER_MANUFACTURER_ARRIVE="NONE" \
15+
MQTT_ADDRESS=0.0.0.0 \
16+
MQTT_PORT=1883 \
17+
MQTT_USER= \
18+
MQTT_PASSWORD= \
19+
MQTT_TOPICPATH=monitor \
20+
MQTT_PUBLISHER_IDENTITY= \
21+
MQTT_CERTIFICATE_PATH= \
22+
MQTT_VERSION= \
23+
LAST_MSG_DELAY=30
724

8-
RUN apt-get update && apt-get -y install apt-transport-https
9-
10-
# GET Mosquitto key for apt
11-
ADD http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key /mosquitto-repo.gpg.key
12-
RUN apt-key add /mosquitto-repo.gpg.key
13-
ADD http://repo.mosquitto.org/debian/mosquitto-stretch.list /etc/apt/sources.list.d/mosquitto-st$
14-
RUN apt-cache search mosquitto
25+
VOLUME /config
1526

1627
# Install Monitor dependencies
17-
RUN apt-get update && \
18-
apt-get install -y \
19-
bluez \
20-
bluez-tools \
21-
libbluetooth-dev \
22-
libmosquitto-dev \
28+
RUN apk add --no-cache \
29+
openrc \
30+
coreutils \
31+
procps \
32+
gawk \
33+
git \
34+
bash \
35+
curl \
2336
mosquitto \
2437
mosquitto-clients \
25-
xxd \
2638
bc \
27-
bluez-hcidump \
28-
git \
29-
wget && \
30-
apt-get clean && \
31-
rm -rf /var/lib/apt/lists/*
39+
bluez \
40+
bluez-deprecated \
41+
bluez-btmon \
42+
dumb-init
3243

33-
ADD startup.sh /startup.sh
44+
COPY startup.sh /startup.sh
45+
COPY health.sh /usr/local/bin/health
3446

3547
# Install Monitor
3648
#WORKDIR /
3749
#RUN git clone git://github.com/andrewjfreyer/monitor
3850
RUN ["chmod", "+x", "/startup.sh"]
39-
ENTRYPOINT ["/startup.sh"]
51+
52+
ENTRYPOINT ["dumb-init", "--", "/startup.sh"]
53+
HEALTHCHECK CMD health

0 commit comments

Comments
 (0)