From 99e44d8a484199b74b5af66c3e438dab11c401d7 Mon Sep 17 00:00:00 2001 From: Ray Ozzie Date: Fri, 22 Apr 2016 13:28:53 -0400 Subject: [PATCH] test --- Dockerfile.template | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Dockerfile.template diff --git a/Dockerfile.template b/Dockerfile.template new file mode 100644 index 0000000..47a84a7 --- /dev/null +++ b/Dockerfile.template @@ -0,0 +1,25 @@ +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 +run sh -c env +ENV RESIN_ARCH %%RESIN_ARCH%% +env RESIN_MACHINE_NAME %%RESIN_MACHINE_NAME%% +run sh -c env + +# Version number of gateway software. +# (Incrementing this simply forces Docker to flush its cache +# and thus forces a full rebuild. Not used outside of Dockerfile.) +ENV TTN_GATEWAY_SOFTWARE 51 + +# 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 +CMD ["sh", "-c", "./run.sh"]