A library for ATProtocol identities.

feature: Added dockerfile

Signed-off-by: Nick Gerakines <nick.gerakines@gmail.com>

Changed files
+54
+54
Dockerfile
···
··· 1 + # Multi-stage build for atproto-identity-rs workspace 2 + # Builds and installs all 7 binaries from the workspace 3 + 4 + # Build stage - use 1.84 to support resolver = "3" 5 + FROM rust:1.84-slim AS builder 6 + 7 + # Install system dependencies needed for building 8 + RUN apt-get update && apt-get install -y \ 9 + pkg-config \ 10 + libssl-dev \ 11 + && rm -rf /var/lib/apt/lists/* 12 + 13 + # Set working directory 14 + WORKDIR /usr/src/app 15 + 16 + # Copy the entire workspace 17 + COPY . . 18 + 19 + # Build all binaries in release mode 20 + # This will build all binaries defined in the workspace: 21 + # - atproto-identity: 4 binaries (resolve, sign, validate, key) 22 + # - atproto-record: 2 binaries (sign, verify) 23 + # - atproto-oauth-axum: 1 binary (oauth-tool) 24 + RUN cargo build --release --bins 25 + 26 + # Runtime stage - use distroless for minimal attack surface 27 + FROM gcr.io/distroless/cc-debian12 28 + 29 + # Create directory for binaries 30 + WORKDIR /usr/local/bin 31 + 32 + # Copy all built binaries from builder stage 33 + COPY --from=builder /usr/src/app/target/release/atproto-identity-resolve . 34 + COPY --from=builder /usr/src/app/target/release/atproto-identity-sign . 35 + COPY --from=builder /usr/src/app/target/release/atproto-identity-validate . 36 + COPY --from=builder /usr/src/app/target/release/atproto-identity-key . 37 + COPY --from=builder /usr/src/app/target/release/atproto-record-sign . 38 + COPY --from=builder /usr/src/app/target/release/atproto-record-verify . 39 + COPY --from=builder /usr/src/app/target/release/atproto-oauth-tool . 40 + 41 + # Default to the main resolution tool 42 + # Users can override with specific binary: docker run <image> atproto-identity-resolve --help 43 + # Or run other tools: docker run <image> atproto-record-sign --help 44 + CMD ["atproto-identity-resolve", "--help"] 45 + 46 + # Add labels for documentation 47 + LABEL org.opencontainers.image.title="atproto-identity-rs" 48 + LABEL org.opencontainers.image.description="AT Protocol identity management tools" 49 + LABEL org.opencontainers.image.source="https://tangled.sh/@smokesignal.events/atproto-identity-rs" 50 + LABEL org.opencontainers.image.version="0.3.0" 51 + LABEL org.opencontainers.image.licenses="MIT" 52 + 53 + # Document available binaries 54 + LABEL binaries="atproto-identity-resolve,atproto-identity-sign,atproto-identity-validate,atproto-identity-key,atproto-record-sign,atproto-record-verify,atproto-oauth-tool"