HiveBrain v1.2.0
Get Started
← Back to all entries
patternModerate

Is running docker-compose not supported in BitBucket?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
dockerbitbucketrunningcomposenotsupported

Problem

Aim

The aim is to run docker-compose in BitBucket pipelines

Attempt

bitbucket-pipelines.yml

image: docker/compose:1.12.0

pipelines:
  default:
    - step:
        script:
          - docker-compose up --build


Outcome

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.


Discussion

According to this post it is not supported?

Solution

Here is my solution: (bitbucket-pipelines.yml)

pipelines:
  default:
    - step:
        script:
          - export DOCKER_COMPOSE_VERSION=1.18.0
          - export DOCKER_COMPOSE_URL=https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)
          - curl -L $DOCKER_COMPOSE_URL > docker-compose
          - chmod +x docker-compose
          - mv docker-compose /usr/local/bin
          - docker-compose build --force-rm --no-cache --pull

Code Snippets

pipelines:
  default:
    - step:
        script:
          - export DOCKER_COMPOSE_VERSION=1.18.0
          - export DOCKER_COMPOSE_URL=https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)
          - curl -L $DOCKER_COMPOSE_URL > docker-compose
          - chmod +x docker-compose
          - mv docker-compose /usr/local/bin
          - docker-compose build --force-rm --no-cache --pull

Context

StackExchange DevOps Q#795, answer score: 11

Revisions (0)

No revisions yet.