blob: 4b9629084a715e7f9348b975e763fcfe51733a88 [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_onu ./adapters/simulated_onu
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_onu && go build -o /build/simulated_onu
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
22# Set the working directory
23WORKDIR /app
24
25# Copy required files
Matt Jeanneret85ab5082019-04-01 11:29:20 -040026COPY --from=build-env /build/simulated_onu /app/
khenaidood2b6df92018-12-13 16:37:20 -050027
Matt Jeanneret85ab5082019-04-01 11:29:20 -040028ENTRYPOINT ["/app/simulated_onu"]