[Docker-compose] volumes

Hello! I’m trying to use docker-compose to run a project mounting the code inside of the container (PHP-Apache)
the problem is when I access to the container I only can see one folder rather than the whole project

Has anyone the same issue?

My config.yml file looks like this:

version: 2
jobs:
  build:
    docker:
      - image: circleci/cci-demo-docker-primary:0.0.2
    working_directory: /app
    steps:
      - checkout
      - setup_remote_docker
      # This should go into custom primary image, here's only for the sake of explanation
      - run:
          name: Install Docker client
          command: |
            set -x
            VER="17.03.0-ce"
            curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
            tar -xz -C /tmp -f /tmp/docker-$VER.tgz
            mv /tmp/docker/* /usr/bin
      - run:
          name: Install Docker Compose
          command: |
            set -x
            curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
            chmod +x /usr/local/bin/docker-compose
      # This should go into custom primary image, here's only for the sake of explanation
      - run:
          name: Start containers
          command: |
            set -x
            chmod ugo+rw . -R
            docker-compose up -d
      - restore_cache:
          key: deps1-{{ .Branch }}-{{ checksum "composer.json" }}
      - run: ls -al
      - run: docker-compose exec web ls -al

can you show us your docker-compose.yml
and the Dockerfiles?

perhaps you do not read this:
https://circleci.com/docs/2.0/building-docker-images/#separation-of-environments

1 Like