blob: 4a3f548117cf9a3eae3f04354236736d5d3c5a19 [file] [log] [blame]
khenaidood2b6df92018-12-13 16:37:20 -05001# -------------
2# Build stage
3
Matt Jeanneret85ab5082019-04-01 11:29:20 -04004FROM base AS build-env
khenaidood2b6df92018-12-13 16:37:20 -05005
khenaidooffe076b2019-01-15 16:08:08 -05006WORKDIR $GOPATH/src/github.com/opencord/voltha-go
7
khenaidood2b6df92018-12-13 16:37:20 -05008# Copy files
Matt Jeanneret85ab5082019-04-01 11:29:20 -04009COPY adapters/simulated_olt ./adapters/simulated_olt
10COPY adapters/common ./adapters/common
11COPY adapters/*.go ./adapters/
khenaidooffe076b2019-01-15 16:08:08 -050012
Matt Jeanneret85ab5082019-04-01 11:29:20 -040013# Build
14RUN cd adapters/simulated_olt && go build -o /build/simulated_olt
15
khenaidood2b6df92018-12-13 16:37:20 -050016
17# -------------
18# Image creation stage
19
Matt Jeanneret85ab5082019-04-01 11:29:20 -040020FROM alpine:3.9
khenaidood2b6df92018-12-13 16:37:20 -050021# Set the working directory
22WORKDIR /app
23
24# Copy required files
Matt Jeanneret85ab5082019-04-01 11:29:20 -040025COPY --from=build-env /build/simulated_olt /app/
khenaidood2b6df92018-12-13 16:37:20 -050026