Run a command for a docker image with all of its linked dependencies