-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (18 loc) · 858 Bytes
/
Copy pathDockerfile
File metadata and controls
19 lines (18 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM docker.io/library/golang:1.26.5-alpine@sha256:0178a641fbb4858c5f1b48e34bdaabe0350a330a1b1149aabd498d0699ff5fb2 AS build
WORKDIR /src
COPY go.mod go.sum* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/ai-model-bom .
FROM docker.io/library/alpine:3.23@sha256:fd791d74b68913cbb027c6546007b3f0d3bc45125f797758156952bc2d6daf40
RUN mkdir -p /etc/ai-model-bom /models && chown 65534:65534 /models
COPY policies/container-policy.yaml /etc/ai-model-bom/policy.yaml
COPY --from=build /out/ai-model-bom /usr/local/bin/ai-model-bom
ENV AIMBOM_CONFIG=/etc/ai-model-bom/policy.yaml
ENV ALLOW_REMOTE_BIND=true
USER 65534:65534
EXPOSE 8515
ENTRYPOINT ["ai-model-bom"]
CMD ["serve"]
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD wget -q -O /dev/null http://127.0.0.1:8515/health || exit 1