Mounting an executable into a container

Recently, I’ve come across quite a few containers which don’t contain basic tooling like a shell or other tools like ip, ifconfig or lsof to troubleshoot issues.

Is there a way to mount these tools into the container from the host system? I tried docker volumes mounts, but they don’t seem to work. Any other ideas, besides rolling my own container?

This is more of a question for a Docker community forum. A quick answer is that you can build containers using the ones that you want to use as a base, or using others as a base and putting the ones you need on top of them. A container can be built by layering multiple containers. You can even copy arbitrary binaries into a container as you build it. The possibilities are endless. But again, this really is not the place to discuss this topic in detail.

Agree, I was more hoping for a Nomad solution where I “mount” the commands into the container instead of rolling my own container.

Sadly, it looks like this is not possible.