mirror of
https://github.com/n0-computer/iroh.git
synced 2026-11-30 00:01:16 +00:00
## Description - We now build the docker test CI jobs in a way that more closely resembles the release process. It should compile the binaries and build the image significantly faster now. (down from 8+ min to 2 min) - Secrets are properly passed in to the reusable workflow so [release docker builds should no longer fail](https://github.com/n0-computer/iroh/actions/runs/10473026816/job/29005092378) ## Breaking Changes <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [ ] 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. - [ ] Tests if relevant. - [ ] All breaking changes documented.
52 lines
981 B
Docker
52 lines
981 B
Docker
### Base image for iroh-relay and iroh-dns-server
|
|
FROM alpine:latest AS base
|
|
RUN apk update && apk add ca-certificates && update-ca-certificates
|
|
|
|
|
|
### Target image
|
|
FROM base AS iroh
|
|
ARG TARGETPLATFORM
|
|
|
|
COPY bins/${TARGETPLATFORM}/iroh /iroh
|
|
|
|
RUN chmod +x /iroh
|
|
|
|
WORKDIR /
|
|
|
|
# expose the default ports
|
|
# rpc, nat-pmp, metrics, iroh_node_ipv4, iroh_node_ipv6
|
|
EXPOSE 4919/udp 5351 9090 11204/udp 11205/udp
|
|
ENTRYPOINT ["/iroh"]
|
|
CMD ["start"]
|
|
|
|
### Target image
|
|
FROM base AS iroh-relay
|
|
ARG TARGETPLATFORM
|
|
|
|
COPY bins/${TARGETPLATFORM}/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 base AS iroh-dns-server
|
|
ARG TARGETPLATFORM
|
|
|
|
COPY bins/${TARGETPLATFORM}/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 [""] |