Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container updates #62

Merged
merged 2 commits into from
Jan 2, 2025
Merged

Container updates #62

merged 2 commits into from
Jan 2, 2025

Conversation

mattcen
Copy link
Contributor

@mattcen mattcen commented Dec 30, 2024

  • Reduce the files copied into the container (and thus, the files whose changes will trigger a full compile, despite not actually being dependencies of compilation).
  • Add documentation and example of building rootless by skipping tests.
  • Add configuration for running a supernode in a container.

In my tests, the supernode didn't actually require --device and --cap-add, but I assume it might if it falls back to being used as a relay?

Sure, these don't end up in the final build stage, but they *do* cause the
builder to re-run anything after COPY . . if anything in, say, the docs/
dir changes.
Add documentation and example of building rootless by skipping tests.

Also add configuration for running a supernode in a container.

In my tests, the supernode didn't actually require --device and
--cap-add, but I assume it might if it falls back to being used as a
relay?


FROM docker.io/library/debian:12

COPY --from=builder /n3n/apps/n3n-edge /n3n-edge
COPY --from=builder /n3n/apps/n3n-supernode /n3n-supernode
Copy link
Contributor Author

@mattcen mattcen Dec 30, 2024

Choose a reason for hiding this comment

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

I didn't get the impression that there is a "standard" port recommended for a supernode, otherwise I'd have put in an EXPOSE 1234/udp here, too.

Copy link
Contributor

Choose a reason for hiding this comment

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

There is a default bind port of 7654, so that could be exposed

@hamishcoleman
Copy link
Contributor

The supernode doesnt need the perms - when acting as the fallback relay, it just passes encrypted packets between edge nodes.

@hamishcoleman hamishcoleman merged commit b92fe5d into n42n:main Jan 2, 2025
30 checks passed
@mattcen
Copy link
Contributor Author

mattcen commented Jan 2, 2025

Ah cool, well I've made a follow-up commit to address your comments if you'd like to add that too: mattcen@container-updates

@hamishcoleman
Copy link
Contributor

I'm always quick to merge a documentation patch - they are generally better than what was there before, so improvements can just be added

@mattcen
Copy link
Contributor Author

mattcen commented Jan 2, 2025

whistles nonchalantly mattcen@container-updates

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.

2 participants