docker-library / busybox

Docker Official Image packaging for Busybox
http://busybox.net
388 stars 126 forks source link

Symlink /usr/bin to /bin #156

Closed jkroepke closed 1 year ago

jkroepke commented 1 year ago

Request

Symlink /usr/bin to /bin (like ln -s /bin /usr/bin). At minimum, link /usr/bin/env to /bin/env.

Background:

On all system, there is an executable called /usr/bin/env. For portability reasons, a lot of shell scripts using #!/usr/bin/env sh.

Examples from other systems:

OS env path
OpenBSD /usr/bin/env
FreeBSD /usr/bin/env
Debian /usr/bin/env
Ubuntu /usr/bin/env
CentOS /usr/bin/env
macOS /usr/bin/env
SUSE /usr/bin/env
RHEL /usr/bin/env
NetBSD /usr/bin/env
Solaris /usr/bin/env
BusyBox Docker Image /bin/env

Most of the linux OS also moving from /bin to /usr/bin. To increase the compatibility between busybox and other os images, I highly recommend to make the binary /usr/bin/env available.

tianon commented 1 year ago

Ah, good call-out - I don't want to make the whole directory symlink, but making sure /usr/bin/env exists is a great idea.