Files
urutau/Dockerfile
T
Lucas RayanandClaude Opus 5.5 b4a2c2c9ec
Release / Plan (reuse the published image?) (push) Successful in 4s
CI / Docker image (build and smoke test) (push) Skipped
CI / Format and vet (push) Successful in 1m29s
CI / Tests (Linux, race detector) (push) Failing after 1m48s
CI / Dependency audit (push) Successful in 21s
Release / ci (push) Failing after 1m50s
Release / Build image (amd64) (push) Skipped
Release / Build image (arm64) (push) Skipped
Release / Publish tags (push) Skipped
Release / Gitea release (push) Skipped
feat: Urutau 1.0.0, lightweight threat intelligence and web analytics
Always-on Go service (stdlib only) that follows the Traefik JSON access
log, the sshd log and the fail2ban log of a host, classifies attacks,
scores sources, keeps bounded aggregates with snapshots, and serves an
embedded dashboard with live updates, offline geolocation (DB-IP Lite),
privacy-friendly traffic analytics, an exportable blocklist and
token-authenticated federation between instances.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 16:13:34 -03:00

42 lines
1.6 KiB
Docker

# syntax=docker/dockerfile:1
#
# Urutau image: one static binary (no CGO, standard library only) on Alpine.
# Build stage.
FROM golang:1.26.11-alpine3.24 AS build
WORKDIR /src
COPY go.mod ./
COPY cmd cmd
COPY internal internal
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/urutau ./cmd/urutau
# Runtime stage: CA certificates (peers over HTTPS, geo database download) and
# tzdata so TZ can match the host's fail2ban log. The HEALTHCHECK is the binary
# itself (`urutau healthcheck`): no curl in the image.
# Runs unprivileged (uid 10001). To read /var/log/auth.log (group adm) the
# compose file adds the host group with `group_add: ["4"]`.
FROM alpine:3.24
RUN apk add --no-cache ca-certificates tzdata \
&& addgroup -S -g 10001 urutau \
&& adduser -S -u 10001 -G urutau -h /data -s /sbin/nologin urutau \
&& mkdir -p /data /logs \
&& chown urutau:urutau /data
COPY --from=build /out/urutau /usr/local/bin/urutau
LABEL org.opencontainers.image.title="Urutau" \
org.opencontainers.image.description="Lightweight, always-on threat intelligence for self-hosted servers" \
org.opencontainers.image.source="https://git.lucasrguerra.dev.br/ciberfauna/urutau" \
org.opencontainers.image.licenses="MIT OR Apache-2.0"
ENV URUTAU_BIND=0.0.0.0:8790 \
URUTAU_DATA_DIR=/data \
URUTAU_TRAEFIK_LOG=/logs/traefik/access.log \
URUTAU_AUTH_LOG=/logs/host/auth.log \
URUTAU_FAIL2BAN_LOG=/logs/host/fail2ban.log
USER urutau
WORKDIR /data
VOLUME /data
EXPOSE 8790
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD ["urutau", "healthcheck"]
ENTRYPOINT ["urutau"]
CMD ["serve"]