Docker Community Forums

Share and learn in the Docker community.

Filesystem data folder will not delete

docker

(Dharnnie) #1

Hello,

My docker compose creates a data folder on my machine to persist data like below, but I am unable to delete it.

db: image: mongo container_name: mongodb_container restart: always environment: - MONGO_DATA_DIR=/data/db - MONGO_LOG_DIR=/dev/null - MONGODB_USER="user" - MONGODB_PASS="password" volumes: - ./data/db:/data/db ports: - 27017:27017 command: mongod --smallfiles --logpath=/dev/null

I am unable to delete the data folder. I have tried sudo access and it still doesn’t work.

Can I get help please?