Skip to content
Snippets Groups Projects
ws-events.Dockerfile 456 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 /app/
    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-ws-events-app
    
    FROM scratch
    COPY --from=builder /app/artifacts/ws-events /app/artifacts/ws-events
    ENTRYPOINT ["./artifacts/ws-events"]