forked from reef-pi/reef-pi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (23 loc) · 992 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Use debian as it matches a Raspbian environment
FROM debian:stretch
LABEL maintainer="[email protected]"
RUN apt-get update -y && \
apt-get install curl build-essential git mercurial -y
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt-get install -y nodejs && \
npm install -g npm
RUN curl https://dl.google.com/go/go1.12.4.linux-amd64.tar.gz > /tmp/go1.12.4.linux-amd64.tar.gz && \
tar xvzf /tmp/go1.12.4.linux-amd64.tar.gz -C /usr/local
ENV GOPATH=/gopath
ENV PATH="/usr/local/go/bin:${GOPATH}/bin:${PATH}"
RUN mkdir -p /gopath/src/github.com/reef-pi/reef-pi
WORKDIR /gopath/src/github.com/reef-pi/reef-pi
# Bootstrap dependencies
COPY Makefile package.json package-lock.json /gopath/src/github.com/reef-pi/reef-pi/
RUN npm install
COPY Gopkg.lock Gopkg.toml controller/ /gopath/src/github.com/reef-pi/reef-pi/
RUN make go-get
# Copy the rest of the code base for building
COPY . /gopath/src/github.com/reef-pi/reef-pi/
RUN make bin
USER 9000