I have following mongo docker image:
FROM ubuntu
RUN apt-get update
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/mongodb.list
RUN apt-get update
RUN apt-get install -y mongodb-10gen
RUN mkdir -p /data/db
EXPOSE 27017
CMD ["--port 27017", "--smallfiles"]
ENTRYPOINT usr/bin/mongod
After launching container and attaching to it using bash I try to dump remote db with following command.
mongodump --host *.*.*.* -port 27017 -u user -p pass --authenticationDatabase admin --authenticationMechanism SCRAM-SHA-1 --out /tmp/backup/mongodump.json
I get exception:
connected to: *.*.*.*:27017
assertion: 2 SASL authentication support not compiled into client library.
Should I add some libraries into my image?
Changed Dockerfile to install latest Mongo version, since
SCRAM-SHA-1
was introduced in v3.0