There are several things going on here. I'd like to take a look at the second error first:
The drone/drone
image is configured to automatically run the /drone
command (which you can determine by using docker inspect
and looking for the Entrypoint
key). So if you run:
docker run drone/drone:0.7 help
You end up running, inside the container:
drone help
And of course, if you run:
docker run drone/drone:0.7 /bin/bash
You are running, in the container:
drone /bin/bash
Hence the error message you are seeing ("No help topic for '/bin/bash'"), because you are passing an unrecognized option to the the drone
command.
The first error is much simpler. Your error message is:
exec: \"/bin/bash\": stat /bin/bash: no such file or directory
That seems pretty clear. There is no /bin/bash
. In fact, if you inspect the contents of the image, you'll see that there is only a minimal filesystem. The easiest way to look is by starting a container, then using docker export
, like this:
$ docker run drone/drone:0.7 help
[...output doesn't matter...]
$ docker export $(docker ps -lq) | tar tf -
Which shows you:
.dockerenv
dev/
dev/console
dev/pts/
dev/shm/
drone
etc/
etc/hostname
etc/hosts
etc/mtab
etc/resolv.conf
etc/ssl/
etc/ssl/certs/
etc/ssl/certs/ca-certificates.crt
proc/
sys/
There's no /bin/bash
, no ssh
, no git
, etc, so you're not going to have much luck with your current plan. You may want to consider cloning the remote repositories on your host and then exposing them to your container using a host volume mount (-v /host/path:/container path
), or building a custom image that contains the tooling you need.