This question is in reference to Atlassian Documentation: Use Docker images as build environments in Bitbucket Pipelines
I currently use Docker-Compose and have several Docker containers that I need to properly test. How do I set that up with Pipelines?
Three lines I added to the "script" block:
- apt-get update
# Add python pip and bash
- apt-get -y install python3-minimal python3-pip
# Install docker-compose via pip
- pip3 install docker-compose
I was using the python:3.7.3 image, but it would work on a lot of ubuntu-based images I think.
As an update, Bitbucket has recently announced additional features for docker pipelines that not only allows multiple container builds but also supports docker-compose.
We’re also excited to announce that Pipelines now offers complete hosted Docker support, allowing you to build, run and test your Docker-based services in any configuration that doesn’t require privileged mode on the host. This includes using docker-compose to start a set of microservices up for testing on Pipelines.
Please refer to official documentations for more information.
There is absolutely no mention in the docs about Docker Compose at the time of this writing.
Also, from what I remember the 2 biggest platforms that actually provide support for it (Travis CI and GitLab), both achieve it via some kind of privileged mode. Even Circle CI requires machine executor. So the blog post itself is pretty much contradictory.
Until I see actual working example with docker-compose command, mounted volumes and the like, this so-called "support" may as well not exist.
I get sporadic failures, when I run my docker-compose test. I have seen it quite a few times, when I run the pipeline for the same commit and sometimes it passes, sometimes it fails. In my test I use wait-for-it as described in https://docs.docker.com/compose/startup-order/ and probe the service under test before issuing a request. I have a 15 seconds timeout ATM for booting the service and sometimes I see it failing although in the runs that pass the service is available after 1 second.
For recent docker-compose
Following pipeline file works:
- apk add --no-cache py-pip python-dev libffi-dev openssl-dev gcc libc-dev make
- pip install docker-compose
- docker-compose up
- docker-compose down
Hi any updates from Atlassian on this?
I already had all my tests set up nicely in Docker Compose and then hit this roadblock of Docker Compose not being supported.
The approach of declaring other services and relying is really primitive compared to what Docker Compose offers out of the box.
Running docker-compose results in: The Docker Engine version is less than the minimum required by Compose.
Your current project requires a Docker Engine of version 1.13.0 or greater. Does this mean that running docker-compose is still not supported or is this a configuration issue. (http://devops.stackexchange.com/q/795/210)
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...
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