blob: f3c1dd3e63acf3ad39908c42e7c59733bc5c01e5 [file] [log] [blame]
sslobodra3ea7d42019-01-16 15:03:16 -05001# -------------
2# Build stage
3
sslobodr2fb98b82019-01-21 09:29:51 -05004FROM base AS build-env
sslobodra3ea7d42019-01-16 15:03:16 -05005
6
sslobodra3ea7d42019-01-16 15:03:16 -05007# Copy files
8ADD rw_core $GOPATH/src/github.com/opencord/voltha-go/rw_core
9ADD common $GOPATH/src/github.com/opencord/voltha-go/common
10ADD db $GOPATH/src/github.com/opencord/voltha-go/db
11ADD kafka $GOPATH/src/github.com/opencord/voltha-go/kafka
sslobodra3ea7d42019-01-16 15:03:16 -050012ADD afrouter $GOPATH/src/github.com/opencord/voltha-go/afrouter
13ADD arouterd $GOPATH/src/github.com/opencord/voltha-go/arouterd
sslobodra3ea7d42019-01-16 15:03:16 -050014
15
sslobodr2fb98b82019-01-21 09:29:51 -050016# Repeate here even if done in base file
sslobodra3ea7d42019-01-16 15:03:16 -050017ADD afrouter/arouter.json /src
18
19#
20# Copy generated executables here
21WORKDIR $GOPATH/src/github.com/opencord/voltha-go
sslobodra3ea7d42019-01-16 15:03:16 -050022
23# Compile protobuf files
sslobodr2fb98b82019-01-21 09:29:51 -050024# Repeate here even if done in base file
Stephane Barbarie260a5632019-02-26 16:12:49 -050025RUN go get google.golang.org/genproto/googleapis/api/annotations
sslobodra3ea7d42019-01-16 15:03:16 -050026
27# Build rw_core
28RUN cd arouterd && go build -o /src/arouterd
29
sslobodra3ea7d42019-01-16 15:03:16 -050030# -------------
31# Image creation stage
32
33FROM alpine:3.6
34
35# Set the working directory
36WORKDIR /app
37
38# Copy required files
39COPY --from=build-env /src/arouterd /app/