docker-stellar-core icon indicating copy to clipboard operation
docker-stellar-core copied to clipboard

Allow the .cfg to be overridden

Open jedmccaleb opened this issue 10 years ago • 3 comments

well, it'd always be in the docker file system, so you'd need -v container can't view the host's fs without that but if it's something other than /stellar-core.cfg, confd won't touch it confd will generate it's own /stellar-core.cfg, then we'll just ignore it and use something else

would just be https://github.com/stellar/docker-stellar-core/commit/ef50c2225432d3486d3bbdc49a35b897e8c240b2 I think

can't test it cause dockerhub is being weird atm

then update /etc/init/stellar-core.conf, /usr/local/bin/stellar-core-setup and /usr/local/bin/stellar-core-shell to use `-v /etc/stellar-core.cfg:/stellar-core-override.cfg

jedmccaleb avatar Oct 01 '15 01:10 jedmccaleb

Tried to overwrite stellar-core.cfg, here are few problems:

  • in /start there are various places stellar-core is executed but only one takes overriden config
  • if I don't don't pass env file confd errors with error:
confd[10]: ERROR template: stellar-core.cfg.tmpl:95:8: executing "stellar-core.cfg.tmpl" at <jsonArray (getenv "H...>: error calling jsonArray: unexpected end of JSON input
  • if I comment out confd, then postgres env variables isn't set properly

I succeeded to override config with building a new Dockerfile like this:

  • copied my config file as stellar-core.cfg instead of stellar-core-override.cfg
  • commented out confd call in /start
  • passed postgres env variables explicitly

Akuukis avatar Jul 13 '17 09:07 Akuukis

Seems it is already fixed

vogel avatar Jan 17 '18 11:01 vogel

whats fixed? I am curious how other folks ran this image out of the box? It seem not to include any .cfg file . So how you pass any evn file which doesnt exist in the container itself? That makes me wanna rewrite the Dockerfile ..then whats the use of it? These are the all cgg container has /usr/lib/python2.7/dist-packages/distlib/_backport/sysconfig.cfg, also no .env /usr/lib/python2.7/dist-packages/pycparser/_c_ast.cfg /usr/local/lib/python2.7/dist-packages/boto/pyami/copybot.cfg /usr/local/lib/python2.7/dist-packages/boto/services/sonofmmm.cfg /etc/dpkg/dpkg.cfg /etc/perl/Net/libnet.cfg

kiahmed avatar Feb 17 '18 20:02 kiahmed