I am trying to add bash to a "FROM Scratch" docker image.
I've copied a bash binary from the official bash docker image from docker hub (https://hub.docker.com/_/bash)
docker run -d bash:latest sleep 100
docker cp "$bash_container_id":/usr/local/bin/bash .
My Dockerfile is as follows
FROM jaegertracing/all-in-one:latest
COPY bin/bash /bin
ENV PATH "$PATH:bin/bash"
RUN ["bash"]
Which, when building, results in
Sending build context to Docker daemon 5.213MB
Step 1/4 : FROM jaegertracing/all-in-one:latest
latest: Pulling from jaegertracing/all-in-one
023a144cdcf7: Already exists
d247ed88ca7d: Already exists
dc4682d67823: Already exists
Status: Downloaded newer image for jaegertracing/all-in-one:latest
---> b64ba73d1fa4
Step 2/4 : COPY bin/bash /bin
---> b6e8ae824d24
Step 3/4 : ENV PATH "$PATH:bin/bash"
---> Running in eda2042dff57
Removing intermediate container eda2042dff57
---> f1288ded6fcf
Step 4/4 : RUN ["bash"]
---> Running in 616c80b0cb8c
OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown
the jaegertracing/all-in-one
image is using a "Scratch" base image that contains nothing (no sh, no bash, etc)
I am trying to add bash to it for debugging reasons.
Any suggestions? Thanks in advance