Checks if the port 80 is open silently and sets the return status.
The flaws of this method is that bash is required due to /dev/tcp being a bashism (not a kernel feature) and containers might not contain bash. Similarly, for Debian images, timeout is to be be found in coreutils and might not be available. Both these packages are relatively heavyweight for a container that is supposed to just run a single monolithic binary.
bashcoreutils for timeouttimeout 10s bash -c ':> /dev/tcp/127.0.0.1/80'
For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.