-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): publish docker images (#2520)
## Description Tested here: https://github.com/n0-computer/iroh/actions/runs/9992457651/job/27617587850?pr=2520 Results here: - https://hub.docker.com/r/n0computer/iroh - https://hub.docker.com/r/n0computer/iroh-relay - https://hub.docker.com/r/n0computer/iroh-dns-server Will only trigger on new releases. Pretty happy, images are very slim and builds are pretty snappy. Test it out with `docker run -p 9090:9090 -p 4919:4919/udp -Pit n0computer/iroh:latest --rpc-addr 0.0.0.0:4919 start` Closes #1371 ## 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 - [ ] 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.
- Loading branch information
Showing
4 changed files
with
132 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
### 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 [""] |