title: Docker containers with volume mounting exits immediately on using docker-compose up
body: <p>I am using <code>docker-compose up</code> command to spin-up few containers on AWS AMI RHEL 7.6 instance. I observe that in whichever containers there's a volume mounting, they are exiting with status <code>Exiting(1)</code> immediately after starting and remaining containers remain up. I tried using <code>tty: true</code> and <code>stdin_open: true</code>, but it didn't help. Surprisingly, the set-up works fine in another instance which basically I am trying to replicate in this new one.
  The stopped containers are Fabric v1.2 peers, CAs and orderer. </p>
  
  <p>Docker-compose.yml file which is in root folder where I use <code>docker-compose up</code> command</p>
  
  <pre><code>version: '2.1'
  
  networks:
    gcsbc:
      name: gcsbc
  
  services:
    ca.org1.example.com:
      extends:
        file: fabric/docker-compose.yml
        service: ca.org1.example.com
  </code></pre>
  
  <p>fabric/docker-compose.yml</p>
  
  <pre><code>version: '2.1'
  
  networks:
    gcsbc:
  
  services:
    ca.org1.example.com:
      image: hyperledger/fabric-ca
      environment:
        - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
        - FABRIC_CA_SERVER_CA_NAME=ca-org1
        - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
        - FABRIC_CA_SERVER_TLS_ENABLED=true
        - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
  
      ports:
        - '7054:7054'
      command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
      volumes:
        - ./artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
      container_name: ca_peerorg1
      networks:
        - gcsbc
      hostname: ca.org1.example.com
  </code></pre>