-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (36 loc) · 1.57 KB
/
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
34
35
36
FROM golang AS builder
RUN mkdir -p /go/src/github.com/gorilla/ && \
cd /go/src/github.com/gorilla && \
git clone --depth 1 https://github.com/gorilla/mux && \
mkdir -p /go/src/github.com/dgraph-io/ && \
cd /go/src/github.com/dgraph-io && \
git clone https://github.com/dgraph-io/badger && \
cd /go/src/github.com/dgraph-io/badger && \
git checkout v1.6.0 && \
mkdir -p /go/src/github.com/AndreasBriese/ && \
cd /go/src/github.com/AndreasBriese && \
git clone --depth 1 https://github.com/AndreasBriese/bbloom && \
mkdir -p /go/src/github.com/dgryski/ && \
cd /go/src/github.com/dgryski && \
git clone --depth 1 https://github.com/dgryski/go-farm && \
mkdir -p /go/src/github.com/dustin/ && \
cd /go/src/github.com/dustin && \
git clone --depth 1 https://github.com/dustin/go-humanize && \
mkdir -p /go/src/github.com/golang/ && \
cd /go/src/github.com/golang && \
git clone --depth 1 https://github.com/golang/protobuf && \
mkdir -p /go/src/github.com/pkg/ && \
cd /go/src/github.com/pkg && \
git clone --depth 1 https://github.com/pkg/errors && \
mkdir -p /go/src/github.com/rs/ && \
cd /go/src/github.com/rs && \
git clone --depth 1 https://github.com/rs/xid && \
mkdir -p /go/src/golang/x/ && \
cd /go && \
go get -v golang.org/x/net/trace && \
go get -v golang.org/x/sys/unix
COPY ./src/config.go ./config.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -a -installsuffix cgo -o config .
FROM balenalib/rpi-alpine AS main
COPY --from=builder /go/config ./config
CMD ["./config"]