Files
iroh/docker/Dockerfile.ci
T
Asmir Avdicevic c0fa1f4e81 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.
2024-07-18 17:04:27 +00:00

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 [""]