Error running docker container: No space left on device: "/data/db/journal"
I fixed the problem cleaning the old volumes with the next command:
$ docker volume rm $(docker volume ls -qf dangling=true)
Reference:docker-cleanup-volumes
Update: 07/13/2018
Docker now has a built in command for removing dangling volumes: docker volume prune
.
The Dockerfile for the mongo image shows that the /data/db
path is using a Docker volume:
VOLUME /data/db /data/configdb
If you run:
docker inspect --format '{{ .Mounts }}' <your-container>
That will tell you where the data volume is being mapped on your Mac. If it's mapping to a drive which is low on space, you can start the container pointing to another location which does have space:
docker run -d -v <local-path-with-free-space>:/data/db mongo:3.3
Or add this to your Compose file:
volumes: - <local-path-with-free-space>:/data/db