Docker-compose fails to build image in Pipeline build

I want to build docker image and push it to Amazon ECR. I have scripts which work fine when I run locally. But they fail on pipeline. I got the error

('', "In file './docker-compose.yml' service 'version' doesn't have any configuration options. All top level keys in your docker-compose.yml must map to a dictionary of configuration options.\n")

It looks like a container where pipeline runs my build has an older version of docker-compose. Here is the output from docker version and docker-compose version commands

+ docker version

Client:

 Version:      1.12.6

 API version:  1.24

 Go version:   go1.6.4

 Git commit:   78d1802

 Built:        Wed Jan 11 00:23:16 2017

 OS/Arch:      linux/amd64

Server:

 Version:      1.12.6

 API version:  1.24

 Go version:   go1.6.4

 Git commit:   78d1802

 Built:        Wed Jan 11 00:23:16 2017

 OS/Arch:      linux/amd64

 

+ docker-compose version

docker-compose version 1.5.2, build unknown

docker-py version: 1.8.0

CPython version: 2.7.12

OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016

 

This is very strange because we use custom image for running Pipeline builds and we installed the latest version of docker and docker compose on that image.

 

What I do wrong? How can update docker compose version?

2 answers

0 votes

Hi Andrey,

Pipelines currently doesn't support docker-compose.

You may have already seen this, but Pipelines has added service containers which should cover most use cases.

Documentation and Blog post

Specifically for Amazon ECR, you can follow this open issue to support it in Pipelines for updates.

Hope this helps!

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

678 views 5 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you