mirror of
https://github.com/n0-computer/iroh.git
synced 2026-11-28 08:01:15 +00:00
## Description - Use more `Watchable` in more places - Drops STUN, ICMP and hairpin probes, they are not actually needed in our world - restructure report generation - Keep QAD connections open, instead of recreating them on every report - Removes `STUN` functionality from the relay server **Fixes** - https://github.com/n0-computer/iroh/issues/3315 ## Breaking Changes - removes `iroh_relay::protos::stun::StunError` - removes `iroh_relay::server::testing::stun_config` - removes `iroh_relay::protos::stun` - removes `iroh_relay::quic::QuicClient::get_addr_and_latency` - removes `DEFAULT_STUN_PORT` ## Depends on - [x] #3279 - [x] https://github.com/n0-computer/net-tools/pull/27 --------- Co-authored-by: Kasey <kasey@n0.computer>
66 lines
1.5 KiB
Docker
66 lines
1.5 KiB
Docker
FROM rust:alpine AS chef
|
|
|
|
RUN update-ca-certificates
|
|
RUN apk add --no-cache musl-dev openssl-dev pkgconfig
|
|
RUN cargo install cargo-chef
|
|
WORKDIR /iroh
|
|
|
|
FROM chef AS planner
|
|
COPY . .
|
|
RUN cargo chef prepare --recipe-path recipe.json
|
|
|
|
### Builder image
|
|
FROM chef AS rust_builder
|
|
|
|
RUN update-ca-certificates
|
|
RUN apk add --no-cache musl-dev openssl-dev pkgconfig
|
|
|
|
COPY --from=planner /iroh/recipe.json recipe.json
|
|
# Build dependencies - this is the caching Docker layer!
|
|
RUN cargo chef cook --release --recipe-path recipe.json
|
|
|
|
WORKDIR /iroh
|
|
|
|
# copy entire workspace
|
|
COPY . .
|
|
|
|
RUN cargo build --release --all-features
|
|
|
|
### Target image
|
|
FROM alpine:latest AS iroh-relay
|
|
|
|
RUN apk update && apk add ca-certificates && update-ca-certificates
|
|
|
|
# Copy our build, changing owndership to distroless-provided "nonroot" user,
|
|
# (65532:65532)
|
|
COPY --from=rust_builder /iroh/target/release/iroh-relay /iroh-relay
|
|
|
|
RUN chmod +x /iroh-relay
|
|
|
|
WORKDIR /
|
|
|
|
# expose the default ports
|
|
# http, https, metrics
|
|
EXPOSE 80 443 3478/udp 9090
|
|
ENTRYPOINT ["/iroh-relay"]
|
|
CMD [""]
|
|
|
|
### Target image
|
|
FROM alpine:latest AS iroh-dns-server
|
|
|
|
RUN apk update && apk add ca-certificates && update-ca-certificates
|
|
|
|
# Copy our build, changing owndership to distroless-provided "nonroot" user,
|
|
# (65532:65532)
|
|
COPY --from=rust_builder /iroh/target/release/iroh-dns-server /iroh-dns-server
|
|
|
|
RUN chmod +x /iroh-dns-server
|
|
|
|
WORKDIR /
|
|
|
|
# expose the default ports
|
|
# dns, metrics
|
|
EXPOSE 53/udp 9090
|
|
ENTRYPOINT ["/iroh-dns-server"]
|
|
CMD [""]
|