dockerfile
This commit is contained in:
parent
57de6231da
commit
4d677d57c5
@ -1,4 +1,4 @@
|
|||||||
FROM resin/raspberrypi
|
FROM resin/raspberrypi-buildpack-deps
|
||||||
|
|
||||||
# Enable systemd
|
# Enable systemd
|
||||||
ENV INITSYSTEM on
|
ENV INITSYSTEM on
|
||||||
|
18
Dockerfile~
18
Dockerfile~
@ -1,17 +1,17 @@
|
|||||||
FROM resin/raspberrypi-golang
|
FROM resin/raspberrypi-golang
|
||||||
|
|
||||||
# What's the name of your go package?
|
|
||||||
ENV PKG test
|
|
||||||
|
|
||||||
# Enable systemd
|
# Enable systemd
|
||||||
ENV INITSYSTEM on
|
ENV INITSYSTEM on
|
||||||
|
|
||||||
# Copy all the source code to the place where golang will find it
|
# 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
|
# Build the gateway
|
||||||
WORKDIR $GOPATH/src/$PKG
|
WORKDIR ~/ttn-gateway
|
||||||
RUN go get && go install && go build all
|
RUN ./install.sh
|
||||||
|
|
||||||
# Tell the container to run the golang program's binary on startup
|
# Make sure we start up within the bin directory
|
||||||
CMD ["sh", "-c", "env && $GOPATH/bin/$PKG"]
|
WORKDIR ~/opt/ttn-gateway/bin
|
||||||
|
|
||||||
|
# Start it up
|
||||||
|
CMD ["sh", "-c", "env && ./start.sh"]
|
||||||
|
Loading…
Reference in New Issue
Block a user