Skip to content

feat: support for Dockerfiles in subdirectories #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 15, 2025
Merged

Conversation

dervoeti
Copy link
Member

@dervoeti dervoeti commented May 5, 2025

Needed for stackabletech/docker-images#1067

We want to modularize the Dockerfiles: Components like hbase-operator-tools or phoenix should have their own Dockerfiles, instead of being included in the one for HBase.
Currently, bake expects the Dockerfile to be in f"{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 argument HBASE_HBASE_OPERATOR_TOOLS. While HBASE/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.

@dervoeti dervoeti requested a review from razvan May 5, 2025 17:42
@dervoeti dervoeti force-pushed the feat/subdir-support branch 3 times, most recently from f6e157d to 84c3b08 Compare May 7, 2025 09:38
@dervoeti dervoeti force-pushed the feat/subdir-support branch from 84c3b08 to 9151a0d Compare May 8, 2025 12:16
Copy link
Member

@razvan razvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@dervoeti dervoeti added this pull request to the merge queue May 15, 2025
Merged via the queue into main with commit d38988b May 15, 2025
4 checks passed
@dervoeti dervoeti deleted the feat/subdir-support branch May 15, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants