Docker-compose fails to build image in Pipeline build

Andrey_Kedrov April 19, 2017

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

1 vote
Pejman Ghorbanzade January 16, 2018

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.

0 votes
davina
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2017

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!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events