-
Notifications
You must be signed in to change notification settings - Fork 133
Description
I want to have an init script in my tiny Busybox container check to make sure a socket like /dev/log
both exists and that there is something listening to it before I start any processes that depend on Syslog inside the container or use the logger
command. The problem is, it the official Busybox images don't seem to have any command-line tool that can check the availability of a local Unix socket.
/ # nc -u -z local:/dev/log
nc: bad port spec 'local:/dev/log'
This problem was solved over a decade ago in this old thread:
http://lists.busybox.net/pipermail/busybox/2009-April/069068.html
The problem is that the official busybox image doesn't seem to turn this feature on, even though this may be something that could be needed for some kinds of container logistics. I believe this feature is required for containers that want to run Busybox's syslogd
in from something that doesn't guarantee startup order, like init
.
I can understand if this adds too much bloat, because Busybox image is so pleasantly small. But please consider turning on FEATURE_UNIX_LOCAL=y
in the official Busybox image to allow a container to check a local Unix socket like /dev/log
using the nc
built-in.
For what it's worth, the official Alpine image does turn this feature on. My beef is that at this point I don't need any of the extras that Alpine has except for this, so I could be using a 1.35MB Busybox image instead of a 8.24MB Alpine image (because I have to add busybox-extras
to Alpine).