Skip to content

Commit

Permalink
fix: recover --docker-base-image feature (#906)
Browse files Browse the repository at this point in the history
In the #866 we introduced
the `--docker-base-image` to help user to specify customized build
docker image (such as Linux aarch64 build).

But we noticed that it doesn’t work after the
#894 , because a local
var introduced and the `docker-base-image` arguments is ignored.

This PR try to recover it, if user specify the `--docker-base-image`, it
will be used directly otherwise use the local var.

Test:
```
[root@kunpeng bioconda-recipes]# bioconda-utils build --docker --packages bamstats --docker-base-image ghcr.io/yikun/bioconda-utils-build-env-cos7-aarch64

11:50:12 BIOCONDA INFO Considering total of 1 recipes (bamstats).
11:50:12 BIOCONDA INFO Processing 1 recipes (bamstats).
11:50:12 BIOCONDA WARNING Using tag 2.3.4 for docker image, since there is no image for a not yet release version (2.3.4+0.g9a85115.dirty).
11:50:12 BIOCONDA INFO Using docker image ghcr.io/yikun/bioconda-utils-build-env-cos7-aarch64 for building.
// ... ...
```

Signed-off-by: Yikun Jiang <[email protected]>
  • Loading branch information
Yikun authored Aug 9, 2023
1 parent 9a85115 commit aa08857
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bioconda_utils/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def build(recipe_folder, config, packages="*", git_range=None, testonly=False,
logger.warning(f"Using tag {image_tag} for docker image, since there is no image for a not yet release version ({VERSION}).")
else:
image_tag = VERSION
docker_base_image = f"quay.io/bioconda/bioconda-utils-build-env-cos7:{image_tag}"
docker_base_image = docker_base_image or f"quay.io/bioconda/bioconda-utils-build-env-cos7:{image_tag}"
logger.info(f"Using docker image {docker_base_image} for building.")

docker_builder = docker_utils.RecipeBuilder(
Expand Down

0 comments on commit aa08857

Please sign in to comment.