skip to Main Content

Mac M1: Docker compose fails in vscode – mongodb-database-tools not installable – Debian

I'm running this Docker file in MAC M1: Dockerfile ARG VARIANT=16-bullseye FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && apt-get -y install --no-install-recommends vim wget redis-tools ARG MONGO_CLI_VERSION=4.4 RUN wget -qO - https://www.mongodb.org/static/pgp/server-${MONGO_CLI_VERSION}.asc | sudo apt-key add - RUN…

VIEW QUESTION

Connect to MongoDB via python

I'm trying to connect to mongodb using python and code: myclient = pymongo.MongoClient("mongodb://root:password@mongo:27017/database_sample?authSource=admin") db = myclient.database_sample my_collection = db["database"] but I'm getting pymongo.errors.OperationFailure: Authentication failed., full error: {'ok': 0.0, 'errmsg': 'Authentication failed.', 'code': 18, 'codeName': 'AuthenticationFailed'}

VIEW QUESTION
Back To Top
Search