The following is the GNU All-permissive License as recommended in https://www.gnu.org/licenses/license-recommendations.en.html

Copyright (C) 2024 Free Software Foundation sysadmin@fsf.org

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.

Contributions are welcome. See https://savannah.gnu.org/maintenance/fsf/.

netcat

Netcat can be used to scan a port without nmap. For instance:

# 5 second timeout on port 161
$ nc -vz -w 5 my.fsf.org 161
nc: connect to my.fsf.org (209.51.188.223) port 161 (tcp) timed out: Operation now in progress
nc: connect to my.fsf.org (2001:470:142:5::223) port 161 (tcp) failed: Network is unreachable

Some people consider having netcat installed to be a security risk, because it can be used to listen to and make TCP connections. However that is not the biggest part of our attack surface. It might make sense not to install it in a container though.