How do I use Docker with dbKoda?

To enable Docker integration with dbKoda, you will have to enable it via the Settings panel, this panel can be found by navigating to the Home Tab -> Paths Section -> Docker as shown in the image below.

Docker can be used with dbKoda in two different ways;

  • If Docker Image Name is selected, dbKoda will spin up a new container with that image for each instance of the Mongo Shell it creates (e.g: each different editor window). In this field you should specify the name of the image itself, in this case mongo.
  • If Docker Container ID is selected, dbKoda will use an existing container for running the Mongo Shell. In this field you should specify the ID of the container, this ID can be found by running the command docker ps.

If you wish to use Mongo Utilities like Export or Restore, you will need to mount a volume by selecting two directories, one for your local machine and one within the container, for example '/tmp' to '/tmp' is a common mounting directory.

Docker can be configured in many ways, because of this, the above method may not work for your particular set up, in that case you can set your config manually in the ~/.dbKoda/config.yml directory (or in Windows usually at C:\Users\{YourUserName}\.dbKoda)

PLEASE NOTE: On version 1.0 of dbKoda, there is a known issue occurring on MacOS where the Docker Path is not correctly detected, this can cause a "creation of shell failed" error. The work around for this issue is as follows:

  • In the same config.yml file mentioned above (~/.dbKoda/config.yml for mac), replace each instance of 'docker' with the full path to the docker binary, for example 'docker run ...' becomes '/usr/local/bin/docker run ...'
  • Example configuration file: 
  • The issue should now be resolved for the next time you try to create a connection to Mongo.
Is this article helpful?