For any drone pipeline there are multiple shell command inside. After continuous integration process triggered. The drone-docker-runner will pull the base image, and clone the git repo and then execute each of the shell commands sequentially.
According to the drone-docker-runner source code, (I am not good on Golang). I only can find that the runner utilize the docker official SDK for docker manipulation.
I have search about how to run multiple commands in docker container on the internet. But the only answer is docker run bash -c 'cmd 1 && cmd 2 && cmd3'
or bash -c 'cmd 1; cmd 2; cmd 3'
. I don’t think drone-docker-runner will use this way.
I know the runner use go API for docker which is slightly different than command line client. But their functionality is similar.
Can anyone explain how drone-docker-runner achieve this?