2016-03-21 20:49:34 +00:00
|
|
|
FROM resin/raspberrypi-buildpack-deps
|
2016-03-21 19:36:55 +00:00
|
|
|
|
2016-03-25 18:13:02 +00:00
|
|
|
# Enable systemd, as Resin requires this
|
2016-03-21 19:36:55 +00:00
|
|
|
ENV INITSYSTEM on
|
|
|
|
|
2016-04-22 16:26:57 +00:00
|
|
|
# Make the hardware type available as a runtime env var
|
|
|
|
ENV RESIN_ARCH %%RESIN_ARCH%%
|
|
|
|
|
2016-03-25 18:21:04 +00:00
|
|
|
# Version number of gateway software.
|
2016-03-25 18:13:02 +00:00
|
|
|
# (Incrementing this simply forces Docker to flush its cache
|
2016-03-25 18:21:04 +00:00
|
|
|
# and thus forces a full rebuild. Not used outside of Dockerfile.)
|
2016-04-19 00:18:22 +00:00
|
|
|
ENV TTN_GATEWAY_SOFTWARE 51
|
2016-03-25 18:13:02 +00:00
|
|
|
|
2016-03-29 22:27:49 +00:00
|
|
|
# Copy the build and run environment
|
|
|
|
COPY . /opt/ttn-gateway/
|
|
|
|
WORKDIR /opt/ttn-gateway/
|
2016-03-21 19:36:55 +00:00
|
|
|
|
2016-03-29 22:27:49 +00:00
|
|
|
# Build the gateway (or comment this out if debugging on-device)
|
|
|
|
RUN ./dev/build.sh && rm -rf ./dev
|
2016-03-21 19:36:55 +00:00
|
|
|
|
|
|
|
# Start it up
|
2016-03-22 23:25:20 +00:00
|
|
|
CMD ["sh", "-c", "./run.sh"]
|