Skip to content

Conversation

@benalleng
Copy link
Collaborator

@benalleng benalleng commented Dec 19, 2025

Originally opened in payjoin/ohttp-relay#49

Feel free to take or leave anything you like here, but wanted to push upstream some minor optimizations to the Dockerfile along with an easy way to get automatic Docker image builds via Github Actions, for both amd64 and arm64.

The main part you may not want is pinning Docker images to releases/tags as I've done here, if not I'm happy to modify the PR to remove that aspect, but I personally like that for two reasons:

  1. It ensures that a bad push to master doesn't publish broken images automatically
  2. It adds a proper Docker tag that can be used, i.e. this will automatically tag the images with the short-sha, latest, and

More detailed discussion is listed in the original repo.

v0.0.9

Pull Request Checklist

Please confirm the following before requesting review:

@coveralls
Copy link
Collaborator

coveralls commented Dec 19, 2025

Pull Request Test Coverage Report for Build 20395401893

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 83.402%

Totals Coverage Status
Change from base Build 20347892595: 0.0%
Covered Lines: 9728
Relevant Lines: 11664

💛 - Coveralls

@benalleng benalleng linked an issue Dec 20, 2025 that may be closed by this pull request
RUN nix \
--extra-experimental-features "nix-command flakes" \
--option filter-syscalls false \
build
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this will work, COPY . /tmp/build will only copy the ohttp-relay subdirectory. if the root was copied, there's no default package defined, so at the very least we need to build like this:

Suggested change
build .#ohttp-relay

if we take the Dockerfile route, but i think it's much easier to use https://github.com/nlewo/nix2container which has the same effect as this dockerfile except the image is constructed directly from a nix derivation, and you can just nix build .#ohttp-relay.dockerImage

regardless, mainly in order to note this down somewhere linked, this will currently ship a release binary but if #1228 is merged it will start shipping debug builds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OHTTP relay doesn't build

4 participants