linux怎么查看本机内存大小
239
2022-12-01
Docker mongodb Dockerfile ubuntu
1.目录结构,把配置文件也放这里,等下复制到image里面去
2.mongod.conf
net: 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: true
3. dockerfile
#FROM debian:wheezyFROM ubuntu# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get addedRUN groupadd -r mongodb && useradd -r -g mongodb mongodbRUN apt-get update RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6RUN echo "deb [ arch=amd64,arm64 ] xenial/mongodb-org/3.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.4.listRUN apt-get updateRUN apt-get install -y mongodb-orgRUN mkdir -p /data/db /data/log /data/configdb \ && chown -R mongodb:mongodb /data/db /data/log /data/configdbVOLUME /data/db /data/log /data/configdbCOPY ./mongod.conf /data/configdb#COPY docker-entrypoint.sh /entrypoint.sh#ENTRYPOINT ["/entrypoint.sh"]EXPOSE 27017CMD ["mongod"]
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~