dappnode / DAppNode

General repository of the project dappnode
GNU General Public License v3.0
581 stars 99 forks source link

Prevent failure with duplicate flags in EXTRA_OPTS #549

Closed dsimog01 closed 1 year ago

dsimog01 commented 1 year ago

When someone installs a new version of a package in which they have included EXTRA_OPTS, if this new version comes with any of the flags defined in EXTRA_OPTS there is a duplication that causes the package to stop working.

This is the solution we have thought of in the package side (for each package that includes EXTRA_OPTS):

  1. The docker-compose must include these envs: 1.1. FLAGS => Will include the default flags for that package 1.2. EXTRA_OPTS => Will be empty by default and edited by the user if desired in the package config section

  2. The command execution format in the entrypoint.sh will be the following: ./command check_extra_opts(FLAGS, EXTRA_OPTS)

  3. The package will include the file check_extra_opts.sh that needs to be copied to the image in build time and it wll be called as defined above in the entrypoint.sh

  4. This check_extra_opts.sh file will return a "space separated" string removing the flags presents both in EXTRA_OPTSand FLAGS from FLAGS, giving priority to those introduced by the user (EXTRA_OPTS)

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

stale[bot] commented 1 year ago

This issue or pull request has been automatically been closed due to inactivity.