Table of Contents

About

Checks if the port 80 is open silently and sets the return status.

Requirements

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.

  • bash
  • coreutils for timeout

Code

timeout 10s bash -c ':> /dev/tcp/127.0.0.1/80'

fuss/docker/health_checks/bash.txt ยท Last modified: 2024/11/05 23:30 by office

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.