2016-03-21 13:49:34 -07:00
|
|
|
FROM resin/raspberrypi-buildpack-deps
|
2016-03-21 12:36:55 -07:00
|
|
|
|
2016-03-25 14:13:02 -04:00
|
|
|
# Enable systemd, as Resin requires this
|
2016-03-21 12:36:55 -07:00
|
|
|
ENV INITSYSTEM on
|
|
|
|
|
2016-03-25 14:21:04 -04:00
|
|
|
# Version number of gateway software.
|
2016-03-25 14:13:02 -04:00
|
|
|
# (Incrementing this simply forces Docker to flush its cache
|
2016-03-25 14:21:04 -04:00
|
|
|
# and thus forces a full rebuild. Not used outside of Dockerfile.)
|
2016-03-25 14:21:31 -04:00
|
|
|
ENV TTN_GATEWAY_SOFTWARE 46
|
2016-03-25 14:13:02 -04:00
|
|
|
|
2016-03-21 12:36:55 -07:00
|
|
|
# Build the gateway
|
2016-03-25 10:38:57 -04:00
|
|
|
COPY build.sh /tmp/build.sh
|
|
|
|
WORKDIR /tmp
|
2016-03-22 16:25:20 -07:00
|
|
|
RUN ./build.sh
|
2016-03-21 12:36:55 -07:00
|
|
|
|
2016-03-22 16:08:14 -07:00
|
|
|
# Copy the run shell script after build, so we can modify it without rebuilding
|
2016-03-25 10:14:19 -04:00
|
|
|
COPY run.sh /opt/ttn-gateway/run.sh
|
|
|
|
WORKDIR /opt/ttn-gateway
|
2016-03-21 12:36:55 -07:00
|
|
|
|
|
|
|
# Start it up
|
2016-03-22 16:25:20 -07:00
|
|
|
CMD ["sh", "-c", "./run.sh"]
|