mirror of
https://github.com/timothymiller/cloudflare-ddns.git
synced 2026-03-26 00:48:56 -03:00
Switch reqwest to rustls-no-provider and add rustls crate; install rustls provider at startup. Replace regex::Regex with regex_lite::Regex across code. Consolidate api_get/post/put/delete into a single api_request that takes a Method and optional body. Add .dockerignore and UPX compression in Dockerfile. Remove unused domain/IDNA code, trim dead helpers, tweak tokio flavor and release opt-level, and update tests to use crate::test_client()
15 lines
478 B
Docker
15 lines
478 B
Docker
# ---- Build ----
|
|
FROM rust:alpine AS builder
|
|
RUN apk add --no-cache musl-dev
|
|
WORKDIR /build
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY src ./src
|
|
RUN cargo build --release
|
|
RUN apk add --no-cache upx && upx --best --lzma target/release/cloudflare-ddns
|
|
|
|
# ---- Release ----
|
|
FROM scratch AS release
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
COPY --from=builder /build/target/release/cloudflare-ddns /cloudflare-ddns
|
|
ENTRYPOINT ["/cloudflare-ddns", "--repeat"]
|