-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0d4d19b
commit 021d831
Showing
1 changed file
with
46 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# | ||
# A simple example of how to build a docker container for n3n-edge | ||
# | ||
# Build with the command: | ||
# podman build \ | ||
# --device=/dev/net/tun \ | ||
# --cap-add=NET_ADMIN \ | ||
# -t=n3n \ | ||
# -f doc/Containerfile.example \ | ||
# . | ||
# | ||
# Start a n3n session with: | ||
# podman run \ | ||
# -it \ | ||
# --name=n3n \ | ||
# --device=/dev/net/tun \ | ||
# --cap-add=NET_ADMIN \ | ||
# -v $PWD/n3n:/etc/n3n/ \ | ||
# n3n start -vvvv | ||
# | ||
# Note that the build could be done without the --device and --cap-add if | ||
# the `make test` is omitted | ||
|
||
FROM docker.io/library/debian:12 AS builder | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y build-essential autoconf git python3 jq sudo | ||
|
||
WORKDIR /n3n | ||
|
||
COPY . . | ||
|
||
RUN \ | ||
./autogen.sh && \ | ||
./configure && \ | ||
make clean all && \ | ||
make test | ||
|
||
|
||
FROM docker.io/library/debian:12 | ||
|
||
COPY --from=builder /n3n/apps/n3n-edge /n3n-edge | ||
|
||
VOLUME [ "/etc/n3n" ] | ||
ENTRYPOINT ["/n3n-edge"] | ||
CMD ["start"] |