mirror of
https://github.com/safedep/vet.git
synced 2025-12-10 00:22:08 -06:00
* feat: ver-mcp registry publishing * Update .github/workflows/publish-mcp.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Kunal Singh <kunalsin9h@gmail.com> * feat: verify job for mcp server publish * feat: refactor server.json location * fix: cd to .mcp-publisher dir * update logo urls * refactor: publish to mcp when container is build --------- Signed-off-by: Kunal Singh <kunalsin9h@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
46 lines
1.4 KiB
Docker
46 lines
1.4 KiB
Docker
FROM --platform=$BUILDPLATFORM golang:1.25-bookworm@sha256:c4bc0741e3c79c0e2d47ca2505a06f5f2a44682ada94e1dba251a3854e60c2bd AS build
|
|
|
|
WORKDIR /build
|
|
|
|
# Install cross-compilation tools
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
gcc-aarch64-linux-gnu \
|
|
libc6-dev-arm64-cross \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
ARG TARGETPLATFORM
|
|
ENV CGO_ENABLED=1
|
|
|
|
# Set up cross-compilation environment based on target platform
|
|
RUN case "${TARGETPLATFORM}" in \
|
|
"linux/amd64") \
|
|
CC=gcc CXX=g++ GOOS=linux GOARCH=amd64 make quick-vet ;; \
|
|
"linux/arm64") \
|
|
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ GOOS=linux GOARCH=arm64 make quick-vet ;; \
|
|
*) echo "Unsupported platform: ${TARGETPLATFORM}" && exit 1 ;; \
|
|
esac
|
|
|
|
FROM debian:12-slim@sha256:b1a741487078b369e78119849663d7f1a5341ef2768798f7b7406c4240f86aef
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
LABEL org.opencontainers.image.source=https://github.com/safedep/vet
|
|
LABEL org.opencontainers.image.description="Open source software supply chain security tool"
|
|
LABEL org.opencontainers.image.licenses=Apache-2.0
|
|
LABEL io.modelcontextprotocol.server.name="io.github.safedep/vet-mcp"
|
|
|
|
COPY ./samples/ /vet/samples
|
|
COPY --from=build /build/vet /usr/local/bin/vet
|
|
|
|
ENTRYPOINT ["vet"]
|