This question is in reference to Atlassian Documentation: Use Docker images as build environments in Bitbucket Pipelines
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got it. That helped a lot for me to setup the pipeline correctly. It works just fine now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No I do not mean a bamboo remote agent (unless you are saying that the Pipeline plugin uses bamboo)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.