Skip to content
Snippets Groups Projects

Migration in monorepo

Merged Ghost User requested to merge istaester/init-monorepo into develop
3 files
+ 75
17
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 16
17
# syntax = docker/dockerfile:1.2
ARG GOLANG_VERSION=1.18
ARG BUILDARGS
ARG $GITLAB_PROXY
FROM golang:1.18-alpine AS installer
WORKDIR /build
RUN apk add --no-cache git make build-base
RUN apk add --update --no-cache alpine-sdk
COPY go.mod .
COPY go.sum .
FROM ${GITLAB_PROXY}golang:$GOLANG_VERSION-buster AS installer
WORKDIR /src/gosdn/controller
COPY go.* ./
RUN go mod download
FROM installer as builder
COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build \
GOOS=linux go build -o orchestrator ./cmd/csbi/main.go
FROM golang:1.18-alpine
RUN apk add --no-cache git make build-base
RUN apk add --update --no-cache alpine-sdk
COPY --from=builder /build/orchestrator .
COPY --from=builder /build/models ./models
COPY --from=builder /build/resources ./resources
COPY ./csbi ./
RUN make build
FROM scratch
COPY --from=builder artifacts/orchestrator .
COPY --from=builder csbi/models ./models
COPY --from=builder csbi/resources ./resources
EXPOSE 55056
ENTRYPOINT [ "./orchestrator" ]
ENTRYPOINT [ "/orchestrator" ]
CMD [""]
Loading