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

Consume API service from Bash in Docker


Hello to all,


My problem is that I need to use Powershell with an specific modul that don't have compatibility with Linux os. Also, I can't use Windows os to build my own Pipelines.

Then I'm thinking into create a API Services and consume that through Bash. Can I consume API from docker for Bitbucket Pipeline?


@Halyna Berezovska can you help me?


Thanks! :)

1 answer

0 votes

@sergibarca hello!

Okay, let's go in details.

Am I right that you need to use an API?

What exactly you want to do?


You can actually defaine firstly your api as service definition (see here how to define a service in definitions block )


               image: my-dockerhub/my-repository

               image: mongo

And then you can use it in step:

image : ...
   - # execute bash command here

   - my-awesome-api


As bash command you actually can also execute some powershell commands using in your step

image:, and put in script lines like

pwsh -Command {your command}

but it may be limited somehow and this depends on what you're trying to do in powershell.

Perhaps in bash it would be easier for you, but this depends on what you need exactly.


How are you supposed to use API? If you just need to check urls, you can write bash script, it will be much easier, for example, using curl utility , e.g. like 

curl <your_api_url>:<port>/v1/users/


Let's talk about your case.

Regards, Galyna

Suggest an answer

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

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

146 views 2 4
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