Docker - Cannot connect to mg_client inside a container

Hi,

I am trying to access mg_client inside a docker container but unfortunately, I am unable to connect it. I have followed instructions from the docs.

Here is the docker-compose.yaml -

version: "3"
services:
  redis:
    image: redislabs/redisgraph
    container_name: redis
    restart: unless-stopped
    ports:
      - "6379:6379"

  memgraph:
    image: memgraph
    container_name: memgraph
    restart: unless-stopped
    ports:
      - "7687:7687"

CLI returns back an error -

What can be a possible mistake from my end?

PS: I am trying to create a Project with Memgraph, Neo4j, and RedisGraph running simultaneously and accessing each datastore using Python libs/adapter. This is the very initial step towards it.

Feedback would be appreciated @toni @buda :slight_smile:

2 Likes

Memgraph is successfully initialized as shown.

Thanks.

1 Like

Strangely, if I execute it inside container, I am able to connect.

1 Like

Here is the answer that will hopefully help! :smiley:

2 Likes

Definitely helped me! Thanks for the amazing support. :slight_smile:

This answer serves my question. However, moving forward I would like to ask you few things :slight_smile:

  1. What are the volumes necessary to be mounted to the host machine in order to visualize any Graph data?

  2. Is there any official docker image for memgraph available on the docker hub?

  3. Is there a way to install mg_console without building it from the source? Because it returns with errors sometimes.

Thank you. @buda

2 Likes

Amazing!

  1. Volumes are not required to visualize data. Once an instance is running, data should be fetched via Bolt protocol and visualized somehow.
  2. Memgraph doesn’t provide the DockerHub image yet, but there is a plan to offer that soon.
  3. The only way to install mgconsole is to build it from the source. In a similar way to how we plan to offer DockerHub image, there is a plan to put mgconsole in the repo. Before doing that, we’ll probably ship mgconsole together with Memgraph so. There won’t be a need to install it manually.

@red_devil answers are also under comments on SO :smiley:

1 Like