sslobodr | 2fb98b8 | 2019-01-21 09:29:51 -0500 | [diff] [blame] | 1 | # ------------- |
| 2 | # Build stage |
| 3 | |
| 4 | FROM golang:1.10-alpine |
| 5 | |
| 6 | |
| 7 | # Install required packages |
| 8 | RUN apk add --no-cache wget git make build-base protobuf protobuf-dev |
| 9 | |
| 10 | RUN git clone https://github.com/googleapis/googleapis.git /usr/local/include/googleapis |
| 11 | |
| 12 | # Prepare directory structure |
William Kurkian | daa6bb2 | 2019-03-07 12:26:28 -0500 | [diff] [blame^] | 13 | RUN ["mkdir", "-p", "/src"] |
sslobodr | 2fb98b8 | 2019-01-21 09:29:51 -0500 | [diff] [blame] | 14 | RUN ["mkdir", "-p", "$GOPATH/src", "$GOPATH/pkg", "$GOPATH/bin"] |
William Kurkian | daa6bb2 | 2019-03-07 12:26:28 -0500 | [diff] [blame^] | 15 | RUN ["mkdir", "-p", "$GOPATH/src/github.com/opencord/voltha-go"] |
sslobodr | 38afd0d | 2019-01-21 12:31:46 -0500 | [diff] [blame] | 16 | RUN ["mkdir", "-p", "/share"] |
sslobodr | 2fb98b8 | 2019-01-21 09:29:51 -0500 | [diff] [blame] | 17 | |
sslobodr | 2fb98b8 | 2019-01-21 09:29:51 -0500 | [diff] [blame] | 18 | # Copy files |
| 19 | #ADD rw_core $GOPATH/src/github.com/opencord/voltha-go/rw_core |
| 20 | #ADD common $GOPATH/src/github.com/opencord/voltha-go/common |
| 21 | #ADD db $GOPATH/src/github.com/opencord/voltha-go/db |
| 22 | #ADD kafka $GOPATH/src/github.com/opencord/voltha-go/kafka |
| 23 | ADD vendor $GOPATH/src/github.com/opencord/voltha-go/vendor |
| 24 | #ADD afrouter $GOPATH/src/github.com/opencord/voltha-go/afrouter |
| 25 | |
sslobodr | 2fb98b8 | 2019-01-21 09:29:51 -0500 | [diff] [blame] | 26 | ADD afrouter/arouter.json /src |
| 27 | |
| 28 | # |
| 29 | # Copy generated executables here |
| 30 | WORKDIR $GOPATH/src/github.com/opencord/voltha-go |
| 31 | |
| 32 | #RUN ls -ltrR /go/src/github.com/opencord/voltha-go |
| 33 | |
sslobodr | 38afd0d | 2019-01-21 12:31:46 -0500 | [diff] [blame] | 34 | VOLUME /share |