22 lines
620 B
Docker
Raw Normal View History

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-26 14:07:39 -04:00
ENV TTN_GATEWAY_SOFTWARE 48
2016-03-25 14:13:02 -04:00
2016-03-21 12:36:55 -07:00
# Build the gateway
2016-03-26 14:45:52 -04:00
COPY build.sh /opt/ttn-gateway/dev/build.sh
WORKDIR /opt/ttn-gateway/dev
2016-03-26 17:52:16 -04:00
RUN ./build.sh && rm -rf /opt/ttn-gateway/dev
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"]