blob: 8d561c21ec1c602f5da745aafaa4e9b0ad3f9a70 [file] [log] [blame]
Stephane Barbariea75791c2019-01-24 10:58:06 -05001# -------------
2# Build stage
3
Matt Jeanneret85ab5082019-04-01 11:29:20 -04004FROM base AS build-env
Stephane Barbariea75791c2019-01-24 10:58:06 -05005
6WORKDIR $GOPATH/src/github.com/opencord/voltha-go
7
Matt Jeanneret85ab5082019-04-01 11:29:20 -04008# Copy files.
9COPY ro_core ./ro_core
Stephane Barbariea75791c2019-01-24 10:58:06 -050010
Matt Jeanneret85ab5082019-04-01 11:29:20 -040011# Build
12RUN cd ro_core && go build -o /build/ro_core
13
Stephane Barbariea75791c2019-01-24 10:58:06 -050014
15# -------------
16# Image creation stage
17
Matt Jeanneret85ab5082019-04-01 11:29:20 -040018FROM alpine:3.9
Stephane Barbariea75791c2019-01-24 10:58:06 -050019
20# Set the working directory
21WORKDIR /app
22
23# Copy required files
Matt Jeanneret85ab5082019-04-01 11:29:20 -040024COPY --from=build-env /build/ro_core /app/
Stephane Barbariea75791c2019-01-24 10:58:06 -050025