# Docker-compose issue - Change from 10/30 to 10/31

**URL:** <https://discuss.circleci.com/t/docker-compose-issue-change-from-10-30-to-10-31/26189>\
**Category:** Deployments\
**Tags:** docker\
**Created:** [October 31, 2018, 10:35pm UTC](https://discuss.circleci.com/t/docker-compose-issue-change-from-10-30-to-10-31/26189 "2018-10-31T22:35:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsandersAzure](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/dsandersazure/32/19643_2.png) [@dsandersAzure](https://discuss.circleci.com/u/dsandersAzure)\
**Post date:** [October 31, 2018, 10:35pm UTC](https://discuss.circleci.com/t/docker-compose-issue-change-from-10-30-to-10-31/26189/1 "2018-10-31T22:35:24Z")

</div>

Last night, my automated build ran properly and created all of its containers correctly:

> Creating docker\_redis\_1 …  
> Creating docker\_cowbull\_svc\_1 …  
> Creating docker\_cowbull\_webapp\_1 …

And my tests were able to run successfully. Today (10/31) and the container names have been appended with a random identifier, making it impossible to connect to them:

> Creating docker\_redis\_1\_6c62b2eb2cd9 …  
> Creating docker\_cowbull\_svc\_1\_994bd24bd543 …  
> Creating docker\_cowbull\_webapp\_1\_2b7fe6543442 …

Is this a bug or a change in behaviour

David

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [October 31, 2018, 10:49pm UTC](https://discuss.circleci.com/t/docker-compose-issue-change-from-10-30-to-10-31/26189/2 "2018-10-31T22:49:40Z")

</div>

Are you using a machine executor or a Docker executor? For either one, which image are you using?

(If you wish, you can install Docker Compose yourself, right down to a specific version).

---

<div class="post-metadata">

**Author:** ![dsandersAzure](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/dsandersazure/32/19643_2.png) [@dsandersAzure](https://discuss.circleci.com/u/dsandersAzure)\
**Post date:** [October 31, 2018, 11:01pm UTC](https://discuss.circleci.com/t/docker-compose-issue-change-from-10-30-to-10-31/26189/3 "2018-10-31T23:01:02Z")

</div>

I’m using the Docker executor. It’s worked for months but the behaviour just changed overnight - literally ran my last build about 8pm Eastern and then tonight it failed because of the container names; here’s the snipped of code

```auto
      - setup_remote_docker

      - run:
          name: Docker login
          command: |
            docker login --username=$doclog --password=$docpass

      - run:
          name: Docker up
          environment:
            COWBULL_ENVIRONMENT: "CircleCI"
          command: |
            set -o pipefail
            export BUILD_NUMBER=$MAJOR_VERSION"."$MINOR_VERSION"."$CIRCLE_BUILD_NUM
            export doclog=${doclog}
            echo "Testing ${BUILD_NUMBER}"
            docker-compose -f vendor/docker/docker-compose-cicd.yml up -d

```

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [November 1, 2018, 7:48am UTC](https://discuss.circleci.com/t/docker-compose-issue-change-from-10-30-to-10-31/26189/4 "2018-11-01T07:48:13Z")

</div>

> [@halfer](#):
>
> For either one [Docker or Machine executor], **which image are you using** [for the build server]?

🙂

---

<div class="post-metadata">

**Author:** ![dsandersAzure](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/dsandersazure/32/19643_2.png) [@dsandersAzure](https://discuss.circleci.com/u/dsandersAzure)\
**Post date:** [November 2, 2018, 5:43pm UTC](https://discuss.circleci.com/t/docker-compose-issue-change-from-10-30-to-10-31/26189/5 "2018-11-02T17:43:52Z")

</div>

Hi, I’m using

```auto
jobs:
  build:
    docker:
      - image: circleci/python:2.7

```

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [November 2, 2018, 6:22pm UTC](https://discuss.circleci.com/t/docker-compose-issue-change-from-10-30-to-10-31/26189/6 "2018-11-02T18:22:28Z")

</div>

OK. Have a look to see whether your version of Docker or Docker Compose changed. If you re-run the one that used to work, does that still work? I wonder if an upstream change has broken things for you.

That could come from a CircleCI change in their convenience image, but equally it could come upstream from them, and there is not much they can do about that. I have installed a specific version of DC using Pip, on a bare-bones Docker image, and it has been rock-solid for ~12 months (daily builds).

---

<div class="post-metadata">

**Author:** ![dsandersAzure](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/dsandersazure/32/19643_2.png) [@dsandersAzure](https://discuss.circleci.com/u/dsandersAzure)\
**Post date:** [November 4, 2018, 8:24pm UTC](https://discuss.circleci.com/t/docker-compose-issue-change-from-10-30-to-10-31/26189/7 "2018-11-04T20:24:15Z")

</div>

I was finally able to fix this by doing a workaround - basically looking at the docker ps output to grab the name of the container:

```auto
docker-compose -f vendor/docker/docker-compose-cicd.yml up -d
webapp=$(docker ps -a --format '{{.Names}}' | grep "docker_cowbull_webapp_1_")
echo "export webapp=$webapp" >> $BASH_ENV

```

The tests have been running regularly (at least once a week) for 3 months and I can’t figure out why this broke; however, the cludge code above at least gets the tests running again. The cause appears to be the difference in naming standards (appending a random identifier) which started last week.

PS. the last line `echo "export webapp=$webapp" >> $BASH_ENV` ensures that the env. var. with the container name is passed to the next step.

Hopefully this might help if anyone else runs in to this.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [February 2, 2019, 8:24pm UTC](https://discuss.circleci.com/t/docker-compose-issue-change-from-10-30-to-10-31/26189/8 "2019-02-02T20:24:17Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
