2016-04-22 17:28:53 +00:00
|
|
|
FROM resin/%%RESIN_MACHINE_NAME%%-buildpack-deps
|
|
|
|
|
|
|
|
# Enable systemd, as Resin requires this
|
|
|
|
ENV INITSYSTEM on
|
|
|
|
|
|
|
|
# Make the hardware type available as a runtime env var
|
|
|
|
ENV RESIN_ARCH %%RESIN_ARCH%%
|
2016-04-22 17:30:23 +00:00
|
|
|
ENV RESIN_MACHINE_NAME %%RESIN_MACHINE_NAME%%
|
2016-04-22 17:28:53 +00:00
|
|
|
|
|
|
|
# Copy the build and run environment
|
|
|
|
COPY . /opt/ttn-gateway/
|
|
|
|
WORKDIR /opt/ttn-gateway/
|
|
|
|
|
|
|
|
# Build the gateway (or comment this out if debugging on-device)
|
|
|
|
RUN ./dev/build.sh && rm -rf ./dev
|
|
|
|
|
|
|
|
# Start it up
|
2017-02-26 19:40:44 +00:00
|
|
|
CMD ["sh", "-c", "./run.py"]
|