Skip to content
Snippets Groups Projects
arista-routing-engine.Dockerfile 467 B
Newer Older
  • Learn to ignore specific revisions
  • ARG GOLANG_VERSION=1.21
    
    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-arista-routing-engine-app
    
    # NOTE: We probably want to make this smaller
    FROM builder as gosdn
    ENTRYPOINT ["./artifacts/arista-routing-engine"]