Weighs the soul of incoming HTTP requests to stop AI crawlers
1FROM docker.io/library/golang:1.24 AS build
2ARG BUILDKIT_SBOM_SCAN_CONTEXT=true BUILDKIT_SBOM_SCAN_STAGE=true
3
4WORKDIR /app
5COPY go.mod go.sum /app/
6RUN go mod download
7
8COPY . .
9RUN --mount=type=cache,target=/root/.cache \
10 VERSION=$(git describe --tags --always --dirty) \
11 && go build -o /app/bin/anubis -ldflags="-X github.com/TecharoHQ/anubis.Version=${VERSION}" ./cmd/anubis
12
13FROM docker.io/library/debian:bookworm AS runtime
14ARG BUILDKIT_SBOM_SCAN_STAGE=true
15RUN apt-get update \
16 && apt-get -y install ca-certificates
17
18COPY --from=build /app/bin/anubis /app/bin/anubis
19
20HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD ["/app/bin/anubis", "--healthcheck"]
21CMD ["/app/bin/anubis"]
22
23LABEL org.opencontainers.image.source="https://github.com/TecharoHQ/anubis"