blob: 2d5f139080118e53a33571593cee06d7adf9e6e3 [file] [log] [blame]
# -------------
# Build stage
FROM base AS build-env
WORKDIR $GOPATH/src/github.com/opencord/voltha-go
# Copy files
COPY rw_core ./rw_core
COPY afrouter ./afrouter
COPY arouterd ./arouterd
# Copy config
RUN cp afrouter/arouter.json /build
# Build
RUN cd arouterd && go build -o /build/arouterd
# -------------
# Image creation stage
FROM alpine:3.9
# Set the working directory
WORKDIR /app
# Copy required files
COPY --from=build-env /build/arouterd /app/
COPY --from=build-env /build/arouter.json /app/
ENTRYPOINT ["/app/arouterd"]