mirror of
https://github.com/n0-computer/iroh.git
synced 2026-11-29 08:01:13 +00:00
## Description As previously announced and planned, this removes all protocol implementations from the `iroh` crate, as well as removes the `iroh-cli` crate. The core functionality of those protocols, including RPC & CLI now is in the individual crates. ## Remove from `iroh` - [x] `iroh-docs` - [x] `iroh-blobs` - [x] `iroh-gossip` ## Examples - [x] Move examples to the appropriate repos: https://github.com/n0-computer/iroh-blobs/pull/15 ## Tests - [x] Move the remaining tests to the appropriate repos CLI - [x] Remove ## Breaking Changes - `iroh-cli` removed - the crate itself - the ability to run `iroh` itself in a docker container, as there is no binary anymore - removed - `iroh::blobs` use `iroh_blobs` - `iroh::docs` use `iroh_docs` - `iroh::gossip` use `iroh_gossip` - `iroh::client::blobs` use `iroh_blobs::rpc::client`. a memory client is available on Blobs - `iroh::client::tags` use `iroh_blobs::rpc::client`. a memory client is available on Blobs - `iroh::client::gossip` use `iroh_gossip::rpc::client`. a memory client is available on Gossip - `iroh::client::docs` use `iroh_docs::rpc::client`. a memory client is available on Docs - `iroh::client::authors` use `iroh_docs::rpc::client`. a memory client is available on Docs - `iroh::node::MemNode`, use `Node` directly - `iroh::node::FsNode`, use `Node` directly - `iroh::node::Node::local_pool_handle` - `iroh::node::builder::DocsStorage` - `iroh::node::builder::Builder::enable_gc_policy` - `iroh::node::builder::Builder::enable_docs` - `iroh::node::builder::Builder::register_cb_done` - `iroh::node::builder::ProtocolBuilder::local_pool_handle` - `iroh::node::builder::GcPolicy` - `iroh::util::progress` - `iroh::util::path::IrohPaths::BaoStoreDir` - `iroh::util::path::IrohPaths::DocsDatabase ` - `iroh::util::path::IrohPaths::Console` - `iroh::util::path::IrohPaths::DefaultAuthor` - `iroh::node::Builder` has no more generic parameters anymore - `iroh::node::Node` has no more generic parameters anymore ## Notes & open questions ## Change checklist - [x] Self-review. - [x] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [x] Tests if relevant. - [x] All breaking changes documented. --------- Co-authored-by: Asmir Avdicevic <asmir.avdicevic64@gmail.com>
65 lines
1.5 KiB
Docker
65 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, stun, 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 [""] |