Tags: docker1. Directory structure, put the configuration files here, and so on to copy into the image to 2.mongod.confNET:
port:27017
bindip:0.0.0.0
security:
authorization:enabled
systemlog:
Destination: File
path: "/data/log/mongod.log"
logappend:true
Storage:
dbPath: "/data/db"
# Processmanagement:
# Fork:true3. Dockerfile#FROM debian:wheezy Fromubuntu #addouruserandgroupfirstto makesuretheiridsgetassignedconsistently,regardlessof whateverdependenciesgetadded rungroupadd-rmongodb useradd-r-g
Tags: sudo tps run start database intro other EXE log codeMongoDB Basic InformationMongoDB is an open-source NoSQL database implementation. The repository provides images of each version of MongoDB 2.2 ~ 2.7.How to useThe database is started by default on the 27017 port. -d mongo Connect to a container using another app, you can use -d application-that-uses-mongo or bymongo $ sudo docker run -it --link some
Tags: dockerfile1. Create a new Dockerfile fileDockerfile
12345678910111213141516
# VERSION 0.0.1FROM ubuntu:latestMAINTAINER lanhong Turnbull "[emailprotected]"# Add 10gen official apt source to the sources listRUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.list# Hack for initctl not being available in UbuntuRUN dpkg-divert --local --re
Brief Introduction
MongoDB (from "humongous") is a cross-platform, document-oriented database. As a NoSQL database, MongoDB avoids the traditional structure of a relational database based on tables, and a JSON-like document (MongoDB called the Bson format) with dynamic patterns makes it easier and faster to integrate data in certain types of applications.
Participation in the text
Textbook Code
Textbook Solutions
stating:
Http://proserge.kh.ua/coding/index.php/post/33/MongoDB+for+NodeJs+devs+week4%3A+Perfomancenode. js + MONGO DB is a tool used to build [Web + database] project, and the above textbook is a simple blog in the environment of Docker. The textbook code part of the open space, mainly for the reader to complete their own, the answer is
Tags: nosql database MongoDB Run code function database Mina doc MongodMongoDB is a powerful NoSQL database that briefly explains how to run MongoDB in Docker.Run MONGO DB imagedocker run --name aihr -p 27017:27017 -v /data/db:/data/db -d mongo:3.4 --authLoginSign in and create your own usersdocker exec -it aihr mongo admindb.createUser({ user: ‘lwk‘, pwd: ‘123456‘, roles: [ { role: ‘userAdminAnyDatabase‘,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.