This question is in reference to Atlassian Documentation: Use Docker images as build environments in Bitbucket Pipelines
Ask your question here...
If you're talking about docker images used with Bitbucket Pipelines, then you don't necessarily need git or mercurial on the image. The code will be checked out using a separate image before your container is started.
Assuming that you mean a bamboo remote agent running inside a docker container - we've found that having git installed inside the container is more stable. Find the bamboo remote agent image that Atlassian maintains for how to write your Dockerfile. Note that you need to define a capability for git so that Bamboo knows it's there. You do this with a script they provide. It would look something like this (we use CentOS as the base image):
RUN yum install git RUN /root/bamboo-update-capability.sh "system.git.executable" "/usr/bin/git"
Cool. So then since I do not need git or mercurial, what volume mount do I need for my image so the code can be mounted in it? What I a trying to do is run a command from within my container in the pipeline to generate the files and get those published over to my deployment server.
No I do not mean a bamboo remote agent (unless you are saying that the Pipeline plugin uses bamboo)
The directory containing your code is automatically mounted into your container using the -v option of the docker run command. You can't control where it gets mounted, but your pipeline script will be run from within the directory containing your code.
Got it. That helped a lot for me to setup the pipeline correctly. It works just fine now
It looks like you're new here. Sign in or register to get started.