-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile
29 lines (22 loc) · 839 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Use buildx for multi-platform builds
# Build stage
FROM --platform=$BUILDPLATFORM golang:1.22.2-alpine AS builder
LABEL org.opencontainers.image.source="https://github.com/interlynk-io/sbomqs"
RUN apk add --no-cache make git
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
# Build for multiple architectures
ARG TARGETOS TARGETARCH
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -a -o sbomqs .
RUN chmod +x sbomqs
# Final stage
FROM alpine:3.19
LABEL org.opencontainers.image.source="https://github.com/interlynk-io/sbomqs"
LABEL org.opencontainers.image.description="Quality & Compliance metrics for your sboms"
LABEL org.opencontainers.image.licenses=Apache-2.0
COPY --from=builder /app/sbomqs /app/sbomqs
# Disable version check
ENV INTERLYNK_DISABLE_VERSION_CHECK=true
ENTRYPOINT ["/app/sbomqs"]