blob: 5401514d40144611450bad249a54394bc62df079 [file] [log] [blame]
# -------------
# Build stage
FROM base AS build-env
WORKDIR $GOPATH/src/github.com/opencord/voltha-go
# Copy files
COPY rw_core ./rw_core
COPY afrouter ./afrouter
# Copy config and runtime protobuf needed for routing
RUN cp afrouter/arouter.json /build
RUN cp vendor/github.com/opencord/voltha-protos/go/voltha.pb /build
# Build
RUN cd afrouter && go build -o /build/afrouter
# -------------
# Image creation stage
FROM alpine:3.9
# Set the working directory
WORKDIR /app
# Copy required files
COPY --from=build-env /build/afrouter /app/
COPY --from=build-env /build/arouter.json /app/
COPY --from=build-env /build/voltha.pb /app
ENTRYPOINT ["/app/afrouter"]