Fix bug where sendfile could not determine from user
Improve sending and receiving files example
Moshix and friends have updated FUNET-NJE for Linux. However, it requires some specific configuration and doesn't compile on my Linux (I use arch btw).
So, here is a Docker image!
You can find example configuration files for two nodes in the
examples folder. Docker
will mount the files at
/etc/funetnje in the container.
The default NJE port is
175. The example configuration expects
be exposed as
1751 by Docker and
funetnje.cf for both nodes:
IPADDRESSto be the IP address of your computer
TCPNAMEfor the line to be the IP address of your computer
Then, start two NJE nodes:
docker run -it --rm --name nje_node1 --hostname node1 -v $(pwd)/examples/node1:/etc/funetnje -p 1751:175 funetnje:latest docker run -it --rm --name nje_node2 --hostname node2 -v $(pwd)/examples/node2:/etc/funetnje -p 1752:175 funetnje:latest
If successful, you should see the logs from the
funetnje process appear.
The image contains a
nje user who is a member of the
To log in to
docker exec -it nje_node1 /bin/login -f nje
It is important to use
/bin/login to ensure that a
utmp record is created for the user, this
funetnje process to route messages to you.
.profile run at login sets
mesg y allowing messages to be displayed.
To send a message to
send nje@node2 hello there!
receive commands to send and receive files.
Unlike messages, you do not need to be logged in to the container and, therefore, you can run the commands using
To send a file to
cat local_file.txt | docker exec -i -u nje nje_node1 sendfile nje@node2
Then, view spooled files on
docker exec -u nje nje_node2 qrdr
Finally, receive the file on
NODE2 and write it out
docker exec -u nje nje_node2 receive -o - 0001