Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to configure mongo.shell.path using docker container? #1126

Closed
sweetim opened this issue Jun 9, 2019 · 4 comments
Closed

how to configure mongo.shell.path using docker container? #1126

sweetim opened this issue Jun 9, 2019 · 4 comments
Assignees

Comments

@sweetim
Copy link

sweetim commented Jun 9, 2019

Tried the command from #311

"mongo.shell.path": "docker exec -it mongodb mongo"

but when execute the scrapbook still complains about

This functionality requires the Mongo DB shell, but we could not find it. Please make sure it is on your path or you have set the 'mongo.shell.path' VS Code setting to point to the Mongo shell executable file (not folder). Attempted command: "docker exec -it mongodb mongo"

May I know how can I configure to make it works?

@PrashanthCorp
Copy link
Contributor

Hi @sweetim, there seems to be a legitimate bug in this use-case. I can repro this.

  1. Do you have docker setup with the mongo image?
  2. Builld the docker image to a container named mongodb.
    This command should work on the powershell.

@sweetim
Copy link
Author

sweetim commented Jun 12, 2019

Yes, i have the docker setup already, and can be seen below (obtain using docker ps)

CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS                      NAMES
34f327299918        mongo:4             "docker-entrypoint.s…"   About a minute ago   Up About a minute   0.0.0.0:27017->27017/tcp   mongodb

when I tried them on my wsl or Windows cmd, I could get the response from mongodb

docker exec -it mongodb mongo
MongoDB shell version v4.0.10
connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("a65e33a4-493c-41cc-8202-4ce8f22e060b") }
MongoDB server version: 4.0.10
Server has startup warnings:
2019-06-12T12:31:32.226+0000 I STORAGE  [initandlisten]
2019-06-12T12:31:32.226+0000 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2019-06-12T12:31:32.226+0000 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
2019-06-12T12:31:32.946+0000 I CONTROL  [initandlisten]
2019-06-12T12:31:32.946+0000 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2019-06-12T12:31:32.946+0000 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2019-06-12T12:31:32.946+0000 I CONTROL  [initandlisten]
---
Enable MongoDB's free cloud-based monitoring service, which will then receive and display
metrics about your deployment (disk utilization, CPU, operation statistics, etc).

The monitoring data will be available on a MongoDB website with a unique URL accessible to you
and anyone you share the URL with. MongoDB may use this information to make product
improvements and to suggest MongoDB products and deployment options to you.

To enable free monitoring, run the following command: db.enableFreeMonitoring()
To permanently disable this reminder, run the following command: db.disableFreeMonitoring()
---

>

My current setup:

  • vscode 1.35
  • windows 10 1903
  • mongodb 4

@StephenWeatherford StephenWeatherford self-assigned this Jun 26, 2019
@StephenWeatherford
Copy link
Contributor

#1104

@StephenWeatherford
Copy link
Contributor

Fixed by #1162.

There is a new "mongo.shell.args" setting which should give you what you need.

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants