<p>I've added the BitBucket server integration plugin (<a href="https://plugins.jenkins.io/atlassian-bitbucket-server-integration/" rel="nofollow noreferrer">https://plugins.jenkins.io/atlassian-bitbucket-server-integration/</a>) and can connect to the BitBucket cloud repo from Jenkins:</p>
<p><a href="https://i.stack.imgur.com/0cUEI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0cUEI.png" alt="enter image description here" /></a></p>
<p>But I receive an error when I try to build:</p>
<pre><code>/var/jenkins_home/workspace/bb_add-jenkins-file@tmp/durable-c49dbeca/script.sh: 1: /var/jenkins_home/workspace/bb_add-jenkins-file@tmp/durable-c49dbeca/script.sh: docker: not found
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
[Bitbucket] Notifying commit build result
[Bitbucket] Build result notified
ERROR: script returned exit code 127
Finished: FAILURE
</code></pre>
<p>So it seems I need to install Docker on the Jenkins instance ?</p>
<p><a href="https://plugins.jenkins.io/docker-build-publish/" rel="nofollow noreferrer">https://plugins.jenkins.io/docker-build-publish/</a></p>
<p>I'm following this tutorial to configure Docker with Jenkins: <a href="https://medium.com/@karthi.net/docker-tutorial-build-docker-images-using-jenkins-d2880e65b74" rel="nofollow noreferrer">https://medium.com/@karthi.net/docker-tutorial-build-docker-images-using-jenkins-d2880e65b74</a></p>
<p>and have reached this step:</p>
<p><a href="https://i.stack.imgur.com/Cxtsi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Cxtsi.png" alt="enter image description here" /></a></p>
<p>On my own Jenkins Docker setup page I have :</p>
<p><a href="https://i.stack.imgur.com/p5saw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p5saw.png" alt="enter image description here" /></a></p>
<p>I'm unsure what Docker URL should be used? Do I need to provision a new container instance within the Kubernetes cluster and run docker within this new instance? This new Docker instance is then the <code>Docker Host URI</code> field?</p>

blue-sky
<p>I think that plugin requires the docker cli to be present.
If you run jenkins as a docker image itself, use an image that provides the docker cli, for example <a href="https://hub.docker.com/r/trion/jenkins-docker-client" rel="nofollow noreferrer">https://hub.docker.com/r/trion/jenkins-docker-client</a></p>
<p>If you want to use the host docker daemon for building, you need to bind-mount the docker socket.
If you want to use a sidecar container to provide the docker daemon, for example using a docker-in-docker setup you can usually use the container name as docker host or kubernetes service name. This depends on how you provide the sidecar container and there is no general answer to that.</p>
