Make the Dockerfile work again

As a result of #1225 every Linux binary needed was not allowed
to come from busybox. Which caused the Dockerfile in this repo
and the image @ dockerhub to fail.

This PR relaxes that so that busybox binaries which proved to
work can be used. A whitelist was defined.
This commit is contained in:
Dirk Wetter 2019-04-17 08:09:58 +02:00
parent e4a08b3ed5
commit d3c43fce2d
1 changed files with 3 additions and 1 deletions

View File

@ -18486,11 +18486,13 @@ create_cmd_line_string() {
check_base_requirements() { check_base_requirements() {
local binary='' local binary=''
local whitelist=' hexdump grep awk sed '
for binary in 'hexdump' 'dd' 'grep' 'awk' 'tr' 'sed' 'date' 'cat' 'ps' 'kill' 'head' 'tail' 'dirname'; do for binary in 'hexdump' 'dd' 'grep' 'awk' 'tr' 'sed' 'wc' 'date' 'cat' 'ps' 'kill' 'head' 'tail' 'dirname'; do
if ! type -p "${binary}" &> /dev/null; then if ! type -p "${binary}" &> /dev/null; then
fatal "You need to install ${binary} for this program to work" $ERR_RESOURCE fatal "You need to install ${binary} for this program to work" $ERR_RESOURCE
fi fi
[[ ${whitelist} =~ \ ${binary}\ ]] && continue
"${binary}" --help 2>&1 | grep -iq busybox "${binary}" --help 2>&1 | grep -iq busybox
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
fatal "${binary} is from busybox. Please install a regular binary" $ERR_RESOURCE fatal "${binary} is from busybox. Please install a regular binary" $ERR_RESOURCE