Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How to include files on service containers

I have a seed script that I want to run on a mongo service container for use in my repo's Pipelines. The mongo image can automatically run scripts if provided in a special folder. Is there a way to provide this from my repo code or do I need to create and publish a docker image that includes the seed script(s)?

1 answer

0 votes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 13, 2022

Hi Ben,

Yes, you are able to provide the scripts in the repository source, as when you perform a build - it will clone the Bitbucket repository as your working directory. This then allows you to navigate to this folder and execute scripts.

You could also create a docker image, however, you would need to push changes to the docker image whenever changes to the scripts are made vs simply committing these changes into the repository.


- Ben (Bitbucket Cloud Support)

Hi Ben,

I can access the repository files from the script section of a pipeline step. But how can I mount a folder or a file in my repository as a volume on a service container?


Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 15, 2022 • edited

Hey Ben,

Unfortunately, you are unable to mount volumes in Docker aside from the Bitbucket clone directory as this command has been restricted for security reasons due to requiring root privileges (see: Running docker commands heading)

Another user has raised a request to remove this restriction, you can "Watch" this feature request to receive updates related to it and "Vote" for it to increase its visibility in regard to customer demand:

I have found this community post suggesting solutions for mapping the clone directory below:



- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events