mirror of
https://github.com/getnora-io/nora.git
synced 2026-04-12 10:20:32 +00:00
- ci.yml: add security job (gitleaks, cargo-audit, cargo-deny, trivy fs) - release.yml: restructure into build-binary + build-docker matrix + release - build binary once on self-hosted, reuse across all Docker builds - trivy image scan per matrix variant, results to GitHub Security tab - SBOM generation in SPDX and CycloneDX formats attached to release - deny.toml: cargo-deny policy (allowed licenses, banned openssl, crates.io only) - Dockerfile: remove Rust build stage, use pre-built binary - Dockerfile.astra, Dockerfile.redos: FROM scratch for Russian certified OS support
29 lines
771 B
Docker
29 lines
771 B
Docker
# syntax=docker/dockerfile:1.4
|
|
# Binary is pre-built by CI (cargo build --release) and passed via context
|
|
# Runtime: scratch — compatible with RED OS (FSTEC certified)
|
|
# To switch to official base: replace FROM scratch with
|
|
# FROM registry.red-soft.ru/redos/redos:8
|
|
# RUN dnf install -y ca-certificates && dnf clean all
|
|
|
|
FROM alpine:3.20 AS certs
|
|
RUN apk add --no-cache ca-certificates
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
COPY nora /usr/local/bin/nora
|
|
|
|
ENV RUST_LOG=info
|
|
ENV NORA_HOST=0.0.0.0
|
|
ENV NORA_PORT=4000
|
|
ENV NORA_STORAGE_MODE=local
|
|
ENV NORA_STORAGE_PATH=/data/storage
|
|
ENV NORA_AUTH_TOKEN_STORAGE=/data/tokens
|
|
|
|
EXPOSE 4000
|
|
|
|
VOLUME ["/data"]
|
|
|
|
ENTRYPOINT ["/usr/local/bin/nora"]
|
|
CMD ["serve"]
|