Dockerfile originally written by: https://github.com/matteoredaelli/docker-mongodb-rpi
===
===
git clone https://github.com/GabrielRF/Docker-MongoDB-RPi/
cd Docker-MongoDB-RPi/
docker build -t gabrielrf/docker-mongodb-rpi .
curl -ssl https://get.docker.com | sh
docker run -d -v /usr/local/bin/mongo:/data/db -p 27017:27017 --name mongodb gabrielrf/docker-mongodb-rpi
-d
: Run as a daemon
-v
: Mount a volume - host:container
-p
: Ports - host:container
If you are getting any error after stoping the container, check if mongod.lock
existis. If it does, remove it.
rm /usr/local/bin/mongo/mongod.lock