Netcat copied to container does not work
Summary
The netcat (nc) binary copied into the container is unusable due to missing dependencies. This is the utility that Bitnami uses for probes in Kubernetes and is used in their Helm charts.
Steps to reproduce
- Pull container
- Run the container locally
- Exec into the container
- Try to run 'nc' binary
What is the current bug behavior?
The netcat binary is missing dependencies and throws the following error then exits: nc: error while loading shared libraries: libbsd.so.0: cannot open shared object file: No such file or directory
What is the expected correct behavior?
The nc binary runs and can be used for checking service health
Relevant logs and/or screenshots
nc: error while loading shared libraries: libbsd.so.0: cannot open shared object file: No such file or directory
Possible fixes
Netcat should not be copied like this unless all dependencies are copied: https://repo1.dso.mil/dsop/bitnami/zookeeper/-/blob/development/Dockerfile#L43
It would be better to add the 'nmap-ncat' package to the dnf install here and remove the nc copy line: https://repo1.dso.mil/dsop/bitnami/zookeeper/-/blob/development/Dockerfile#L36
This will create the proper nc binary with relevant dependencies installed
Tasks
-
Bug has been identified and corrected within the container
Please read the Iron Bank Documentation for more info