Skip to content
Snippets Groups Projects
controller.Dockerfile 611 B
Newer Older
  • Learn to ignore specific revisions
  • ARG BUILDARGS
    ARG $GITLAB_PROXY
    
    FROM ${GITLAB_PROXY}golang:$GOLANG_VERSION-alpine as builder
    WORKDIR /gosdn/
    RUN apk add --no-cache build-base
    RUN apk add --no-cache bash
    COPY . .
    RUN --mount=type=cache,target=/root/go/pkg/mod \
        --mount=type=cache,target=/root/.cache/go-build \
        make build-gosdn
    
    # NOTE: We probably want to make this smaller
    FROM builder as gosdn
    COPY controller/configs/development-gosdn.toml.example ./configs/development-gosdn.toml
    COPY controller/configs/containerlab-gosdn.toml.example ./configs/containerlab-gosdn.toml
    ENTRYPOINT ["./artifacts/gosdn"]