bcgov / von-network

A portable development level Indy Node network.
Apache License 2.0
159 stars 188 forks source link

[#223] Remove dependency on bind mounts in docker-compose #224

Closed tdiesler closed 2 years ago

tdiesler commented 2 years ago

Signed-off-by: Thomas Diesler tdiesler@redhat.com

swcurran commented 2 years ago

FYI -- @WadeBarnes has the best knowledge on this repo, so I would like him to take a look at this (and your other PR). He's out for a a bit, but I think that's OK. If anyone else can test and provide expert feedback on these changes, please do.

Thanks!

WadeBarnes commented 2 years ago

The additional Dockerfile would be redundant. Both directories are already built into von-network-base:

With the results inside the image being:

/home/indy
indy@docker-desktop:~$ ls
bin  cli-scripts  config  genesis  indy_config.py  ledger  log  requirements.txt  scripts  server  setup.cfg

and

/home/indy/server
indy@docker-desktop:~/server$ ls
__init__.py  __pycache__  anchor.py  requirements.txt  server.py  static  synctest.py

The bind mount for the server directory is meant to provide a way to override the code already built into the image with the editable versions from the project for development purposes. That way you can stop/start to load new code rather than have to rebuild each time.

The bind mount for the config directory is used with the --taa-sample option for the start | up commands. The sample TAA files are dynamically manipulated by these functions, https://github.com/bcgov/von-network/blob/main/manage#L424-L446, when the --taa-sample option is used. It also provides a way to inject custom TAA files into the running image without having to rebuild the image.

tdiesler commented 2 years ago

ok, thanks