docker-compose安装mongodb
version: '3.1' services: mongodb: image: mongo:latest container_name: mongo environment: TZ: "Asia/Shanghai" MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: mongo123 volumes: - ./data/db:/data/db ports: - "27017:27017" restart: always networks: - mongo networks: mongo: driver: bridge
docker-compose -f /opt/yh/mongo-compose.yaml up -d
navicat连接
文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。