feat: support for Dockerfiles in subdirectories #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Needed for stackabletech/docker-images#1067
We want to modularize the Dockerfiles: Components like
hbase-operator-tools
orphoenix
should have their own Dockerfiles, instead of being included in the one for HBase.Currently,
bake
expects the Dockerfile to be inf"{product_name}/{args.target_containerfile}"
, which is fine. But for Dockerfiles located in subdirectories we need to allow slashes in product names. They are allowed in general and work fine, just not in target names (Invalid name; only "[a-zA-Z0-9_-]+" are allowed
). That's why this PR replaces slashes with underscores (similar to the dots in versions).A similar thing is done for build arguments, so
hbase/hbase-operator-tools
will become the argumentHBASE_HBASE_OPERATOR_TOOLS
. WhileHBASE/HBASE-OPERATOR-TOOLS
would technically work as a build argument, bash variable names only support letters, numbers and underscores.The change should be backwards compatible for us since we currently don't use slashes or hyphens in our build arguments.