blob: ca83f1327f74dcea139cca73e54112019e54a31e [file] [log] [blame]
khenaidoocfee5f42018-07-19 22:47:38 -04001# -------------
2# Build stage
3
Matt Jeanneret85ab5082019-04-01 11:29:20 -04004FROM base AS build-env
khenaidoocfee5f42018-07-19 22:47:38 -04005
khenaidooffe076b2019-01-15 16:08:08 -05006WORKDIR $GOPATH/src/github.com/opencord/voltha-go
7
khenaidoocfee5f42018-07-19 22:47:38 -04008# Copy files
Matt Jeanneret85ab5082019-04-01 11:29:20 -04009COPY rw_core ./rw_core
khenaidooffe076b2019-01-15 16:08:08 -050010
Matt Jeanneret85ab5082019-04-01 11:29:20 -040011# Build
12RUN cd rw_core && go build -o /build/rw_core
13
khenaidoocfee5f42018-07-19 22:47:38 -040014
15# -------------
16# Image creation stage
17
Matt Jeanneret85ab5082019-04-01 11:29:20 -040018FROM alpine:3.9
khenaidoocfee5f42018-07-19 22:47:38 -040019
20# Set the working directory
21WORKDIR /app
22
23# Copy required files
Matt Jeanneret85ab5082019-04-01 11:29:20 -040024COPY --from=build-env /build/rw_core /app/
khenaidoocfee5f42018-07-19 22:47:38 -040025