Git Product home page Git Product logo

Comments (7)

davidmurdoch avatar davidmurdoch commented on July 18, 2024

Can you try node 14 instead?

from ganache-cli-archive.

rodoufu avatar rodoufu commented on July 18, 2024

Same error with node:14.15.4-slim as base image.

Here is how my services are running:

$ docker service ls
ID                  NAME                 MODE                REPLICAS            IMAGE               PORTS
1m00avaeylck        mystack_ganache      replicated          1/1                 my_image:latest    *:8545->8545/tcp

from ganache-cli-archive.

davidmurdoch avatar davidmurdoch commented on July 18, 2024

I don't know docker very well, so I'm afraid I won't be of much help. You can read our docker config here: https://github.com/trufflesuite/ganache-cli/blob/develop/Dockerfile or try using our official Docker container: docker run --publish 8545:8545 trufflesuite/ganache-cli:latest (https://hub.docker.com/r/trufflesuite/ganache-cli/)

from ganache-cli-archive.

rodoufu avatar rodoufu commented on July 18, 2024

I don't know docker very well, so I'm afraid I won't be of much help. You can read our docker config here: https://github.com/trufflesuite/ganache-cli/blob/develop/Dockerfile or try using our official Docker container: docker run --publish 8545:8545 trufflesuite/ganache-cli:latest (https://hub.docker.com/r/trufflesuite/ganache-cli/)

When I use it like that it does work, but the problem is when I run it as a service.

The reason I'm trying to do it like that is that I want to provide the mnemonic for it, is there a way I can provide it to your ganache-cli docker image?
Something like an environment variable or sending parameters to the entry point of the image.

from ganache-cli-archive.

davidmurdoch avatar davidmurdoch commented on July 18, 2024

From https://github.com/trufflesuite/ganache-CLI#docker:

To pass options to ganache-cli through Docker simply add the arguments to the run command:

docker run --detach --publish 8545:8545 trufflesuite/ganache-cli:latest --accounts 10 --debug
                                                                        ^^^^^^^^^^^^^^^^^^^^^

so for passing a mnemonic you would:

docker run --detach --publish 8545:8545 trufflesuite/ganache-cli:latest --mnemonic {YOUR-MNEMONIC-HERE}

Does this solve your issue?

from ganache-cli-archive.

rodoufu avatar rodoufu commented on July 18, 2024

I'm going to try that with your image and passing the arguments to the docker service in the docker stack and I get back here with the answer.

@davidmurdoch thanks for all your help so far, I hope it helps someone else in the future as well.

from ganache-cli-archive.

rodoufu avatar rodoufu commented on July 18, 2024

I've just figured out how to fix that problem, here follows the config:

version: '3.7'

services:
  ganache:
    image: 'trufflesuite/ganache-cli:v6.12.2'
    hostname: ganache
    deploy:
      restart_policy:
        condition: none
    logging:
      driver: "json-file"
      options:
        max-size: 50m
        max-file: 5
    ports:
    - 8545:8545
    command: '-m "mnemonic"'

from ganache-cli-archive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.