sslobodr | 2fb98b8 | 2019-01-21 09:29:51 -0500 | [diff] [blame] | 1 | # ------------- |
| 2 | # Build stage |
| 3 | |
Matt Jeanneret | 85ab508 | 2019-04-01 11:29:20 -0400 | [diff] [blame] | 4 | FROM golang:1.10-alpine3.9 |
sslobodr | 2fb98b8 | 2019-01-21 09:29:51 -0500 | [diff] [blame] | 5 | |
| 6 | # Install required packages |
Matt Jeanneret | 85ab508 | 2019-04-01 11:29:20 -0400 | [diff] [blame] | 7 | RUN apk add --no-cache wget git make build-base |
sslobodr | 2fb98b8 | 2019-01-21 09:29:51 -0500 | [diff] [blame] | 8 | |
| 9 | # Prepare directory structure |
Matt Jeanneret | 85ab508 | 2019-04-01 11:29:20 -0400 | [diff] [blame] | 10 | RUN ["mkdir", "-p", "/build"] |
sslobodr | 2fb98b8 | 2019-01-21 09:29:51 -0500 | [diff] [blame] | 11 | RUN ["mkdir", "-p", "$GOPATH/src", "$GOPATH/pkg", "$GOPATH/bin"] |
William Kurkian | daa6bb2 | 2019-03-07 12:26:28 -0500 | [diff] [blame] | 12 | RUN ["mkdir", "-p", "$GOPATH/src/github.com/opencord/voltha-go"] |
sslobodr | 2fb98b8 | 2019-01-21 09:29:51 -0500 | [diff] [blame] | 13 | |
sslobodr | 2fb98b8 | 2019-01-21 09:29:51 -0500 | [diff] [blame] | 14 | WORKDIR $GOPATH/src/github.com/opencord/voltha-go |
| 15 | |
Matt Jeanneret | 85ab508 | 2019-04-01 11:29:20 -0400 | [diff] [blame] | 16 | # Copy common files. |
| 17 | COPY common ./common |
| 18 | COPY db ./db |
| 19 | COPY kafka ./kafka |
| 20 | COPY vendor ./vendor |