I feel like I am missing something fundamental to lower-level utilities like bash
or echo
.
I have a docker image (ImageA) that is missing a shell utility so it is nearly un-interactable and I need more flexibility from it. Let's assume I cannot recreate the image.
I know it is a Debian-bullseye distro and I assumed that I could just copy the bash
binary from another basic Debian image (ImageB) using Docker multi-stage builds.
I've confirmed it exists in the /bin/ folder of ImageA but any attempts to execute it (or any utility for that matter) does not work with errors like: /bin/bash: no such file or directory
.
Has anyone done anything like this and/or is this idea fundamentally flawed?
ldd /bin/bash
will tell you the libraries thatbash
need in usual dynamic loading – Gilles Quénot Oct 09 '23 at 21:36busybox
, which will get you a decent shell and a bunch of utilities all in one file. – muru Oct 10 '23 at 10:43