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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Pipelines - Docker volumes in services definitions

Edited

I'm defining custom services in my bitbucket-pipelines.yml.

But some of these services must use volumes in order to load an specific application configuration file for functional tests.

I tried this:

...
...
definitions
:
services:
backend-api:
image: atlassian/pipelines-awscli:latest
script:
- eval $(aws ecr get-login --region ${AWS_DEFAULT_REGION} --no-include-email)
- docker run -d -v /opt/atlassian/pipelines/agent/build/cypress/backend-api-config:/config 123456.dkr.ecr.us-east-1.amazonaws.com/backend-api:latest
mongo:
image: mongo

 is it possible? Or should I use docker-compose solution?

1 answer

0 votes

Hi Garry,

you can not have a script section as part of a service definition in Pipelines.

You could bake the commands you want to run into a custom docker image that you want to run as a service or simply run your docker run command as part of a step where you want to use it. To do that make sure to define "docker" as a service for that step.

Max

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,735 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you