forked from jlt24/345SecurityMQTT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.template
27 lines (19 loc) · 878 Bytes
/
Dockerfile.template
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
FROM resin/%%RESIN_MACHINE_NAME%%-debian:stretch AS build
# Install build tools and remove apt-cache afterwards
RUN apt-get -q update && apt-get install -yq --no-install-recommends \
build-essential librtlsdr-dev rtl-sdr libmosquittopp-dev git \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Switch into our apps working directory
WORKDIR /usr/src/app/345SecurityMQTT/src
COPY . /usr/src/app/345SecurityMQTT
WORKDIR /usr/src/app/345SecurityMQTT/src
RUN ./build.sh
FROM resin/%%RESIN_MACHINE_NAME%%-debian:stretch
RUN apt-get -q update && apt-get install -yq --no-install-recommends \
librtlsdr-dev rtl-sdr libmosquittopp-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY --from=build /usr/src/app/345SecurityMQTT/src/345toMqtt 345toMqtt
#switch on systemd init system in container
ENV INITSYSTEM on
# Run our binary on container startup
CMD ./345toMqtt