trufflesuite / ganache-cli-archive

Fast Ethereum RPC client for testing and development. See https://github.com/trufflesuite/ganache for current development.
https://www.trufflesuite.com/ganache
MIT License
3.36k stars 695 forks source link

Fix docker image v6.1.6+ #553

Closed levino closed 6 years ago

levino commented 6 years ago

Using this docker-compose.yml:

version: '3.2'
services:
  dev-blockchain:
    image: trufflesuite/ganache-cli:v6.1.6
    ports:
      - 8545:8545

I cannot connect to localhost:8545. Last working version is 6.1.3. The difference is in the logs:

Remark: Using -h 0.0.0.0 does not work, gives some error about eadrr not found.

Zorato commented 6 years ago

I have the same issue. Update: actually -h 0.0.0.0 works. Here is my docker-compose.yml:

version: "2.1"

services:
  ganache:
    image: trufflesuite/ganache-cli:v6.1.6
    ports:
      - 8545:8545
    entrypoint:
      - node
      - ./build/cli.node.js
      - --host=0.0.0.0
      - --port=8545
      - --gasLimit=7992181
levino commented 6 years ago

It has to be -h=0.0.0.0. Here is my also working docker-compose.yml

version: '3.2'
services:
  dev-blockchain:
    image: trufflesuite/ganache-cli:v6.1.6
    ports:
      - 8545:8545
    command: ["-h=0.0.0.0"]
levino commented 6 years ago

Closing as "weirdly implemented but kinda works as expected".

nicovalencia commented 6 years ago

Adding some keywords to help folks find this (took me a while to get here). Thanks @Levino @Zorato for posting the fix on this.

ganache-cli docker metamask unknown network ports can't connect

mikeseese commented 6 years ago

Further, we addressed this issue in #559. In the next release of ganache-cli (and its Docker container), the host should default to 0.0.0.0 for Docker instances