From 4d677d57c5bf33ca91eed71aa4f285c54e40af6e Mon Sep 17 00:00:00 2001 From: Ray Ozzie Date: Mon, 21 Mar 2016 13:49:34 -0700 Subject: [PATCH] dockerfile --- Dockerfile | 2 +- Dockerfile~ | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index a6227c2..ce4527c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM resin/raspberrypi +FROM resin/raspberrypi-buildpack-deps # Enable systemd ENV INITSYSTEM on diff --git a/Dockerfile~ b/Dockerfile~ index 581ca20..1c21fe1 100644 --- a/Dockerfile~ +++ b/Dockerfile~ @@ -1,17 +1,17 @@ FROM resin/raspberrypi-golang -# What's the name of your go package? -ENV PKG test - # Enable systemd ENV INITSYSTEM on # Copy all the source code to the place where golang will find it -COPY ./src $GOPATH/src +COPY . ~/ttn-gateway -# Build all the golang source -WORKDIR $GOPATH/src/$PKG -RUN go get && go install && go build all +# Build the gateway +WORKDIR ~/ttn-gateway +RUN ./install.sh -# Tell the container to run the golang program's binary on startup -CMD ["sh", "-c", "env && $GOPATH/bin/$PKG"] +# Make sure we start up within the bin directory +WORKDIR ~/opt/ttn-gateway/bin + +# Start it up +CMD ["sh", "-c", "env && ./start.sh"]