Mongo docker containter does not start: '/data/db': Permission denied


I would like to let run Rocket.Chat with Docker containers. So I installed it like described at

But the MongoDB container does not start because of a permission issue. Any idea?

The compose file for MongoDB:

    image: mongo
    container_name: "mongo"
    restart: unless-stopped
     - ./data/db:/data/db
     - ./data/dump:/dump
    command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
    image: mongo
    command: 'bash -c "for i in `seq 1 30`; do mongo mongo/rocketchat --eval \"rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''localhost:27017'' } ]})\" && s=$$? && break || s=$$?; echo \"Tried $$i times. Waiting 5 secs...\"; sleep 5; done; (exit $$s)"'
      - mongo

Server Setup Information

  • Operating System: CentOS 7.4

Any additional Information

~# docker-compose ps
             Name                            Command                 State              Ports
mongo                    mongo ...   Restarting
rocketchat                        bash -c for i in `seq 1 30 ...   Up >3000/tcp
rocketchat_mongo-init-replica_1 bash  ...   Exit 1

~#  docker-compose logs mongo
Attaching to mongo
mongo                 | find: '/data/db': Permission denied