# Can i run behat tests with docker-compose exec?

**URL:** <https://discuss.circleci.com/t/can-i-run-behat-tests-with-docker-compose-exec/20740>\
**Category:** Build Environment\
**Created:** [March 15, 2018, 7:39am UTC](https://discuss.circleci.com/t/can-i-run-behat-tests-with-docker-compose-exec/20740 "2018-03-15T07:39:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![crevillo](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/crevillo/32/17994_2.png) [@crevillo](https://discuss.circleci.com/u/crevillo)\
**Post date:** [March 15, 2018, 7:39am UTC](https://discuss.circleci.com/t/can-i-run-behat-tests-with-docker-compose-exec/20740/1 "2018-03-15T07:39:26Z")

</div>

Hello. This is my first post here. I’m trying to use circle.ci with a php (symfony 4) app. i have setup my config.yml file like

```yaml
version: 2
jobs:
  build:
    working_directory: ~/project
    machine: true
    steps:
      - checkout
      - run:
          name: Build application Docker image
          command: |
            docker-compose up -d
      - run:
          name: Build application Docker image
          command: |
            docker-compose exec php bin/console cache:clear

```

docker-compose up -d ends well, but then, in the second step i get a no container found error.  
if i remove the -d from the docker-compose up then it looks the second run step is never reached.

Any clues? Thanks.

---

<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:** [June 18, 2018, 11:40am UTC](https://discuss.circleci.com/t/can-i-run-behat-tests-with-docker-compose-exec/20740/2 "2018-06-18T11:40:24Z")

</div>


