Files
iroh/docker
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
..
2024-07-08 11:17:31 +00:00

Iroh Docker Images

Intro

A set of docker images provided to easily run iroh in a containerized environment. Features iroh, iroh-relay and iroh-dns-server.

The provided Docker files are intended for CI use but can be also manually built.

Building

  • All commands are run from the root folder
  • If you're on macOS run docker buildx build -f docker/Dockerfile --target iroh --platform linux/arm64/v8 --tag n0computer/iroh:latest .
  • If you're on linux run docker buildx build -f docker/Dockerfile --target iroh --platform linux/amd64 --tag n0computer/iroh:latest .
  • Switch out --target iroh for other targets iroh-relay,iroh-dns-server

Running

iroh

  • As is: docker run -p 9090:9090 -p 4919:4919/udp -Pit n0computer/iroh:latest --rpc-addr 0.0.0.0:4919
  • With parameters: docker run -p 9090:9090 -p 4919:4919/udp -Pit n0computer/iroh:latest --rpc-addr 0.0.0.0:4919 <params>
  • Provide a config file: docker run -v ./docker.iroh.cfg:/iroh.cfg -p 9090:9090 -p 4919:4919/udp -Pit n0computer/iroh:latest --rpc-addr 0.0.0.0:4919 --config iroh.cfg start

iroh-relay

  • Provide a config file: docker run -v /path/to/iroh-relay.conf:/config/iroh-relay.conf -p 80:80 -p 443:443 -p 3478:3478/udp -p 9090:9090 -it n0computer/iroh-relay:latest <params> --config /config/iroh-relay.conf

iroh-dns-server

  • Provide a config file: docker run -v /path/to/iroh-dns-server.conf:/config/iroh-dns-server.conf -p 53:53/udp -p 9090:9090 -it n0computer/iroh-dns-server:latest <params> --config /config/iroh-dns-server.conf