Newer
Older
Malte Bauch
committed
ARG BUILDARGS
ARG $GITLAB_PROXY
FROM ${GITLAB_PROXY}golang:$GOLANG_VERSION-bullseye as builder
Malte Bauch
committed
WORKDIR /gosdn/
COPY . .
RUN --mount=type=cache,target=/root/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
make build-gosdn
FROM ${GITLAB_PROXY}golang:$GOLANG_VERSION-bullseye
WORKDIR /app/
COPY --from=builder /gosdn/controller/configs/development-gosdn.toml.example ./configs/development-gosdn.toml
COPY --from=builder /gosdn/controller/configs/containerlab-gosdn.toml.example ./configs/containerlab-gosdn.toml
COPY --from=builder /gosdn/controller/configs/gNMISubscriptions.txt.example ./configs/gNMISubscriptions.txt
COPY --from=builder /gosdn/artifacts/gosdn ./gosdn
ENTRYPOINT ["./gosdn"]