blob: 23c4ccb4829e92d3f7926bc387cdca06589ebb64 [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
Matt Jeanneret85ab5082019-04-01 11:29:20 -040026ENTRYPOINT ["/app/rw_core"]