From ccc919a0263ae637d9ee60ff411f44776a3fe86b Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Mon, 3 Apr 2023 14:55:42 +0100 Subject: [PATCH 1/6] Add docker registry as configurable parameter - Adds parameter `--registry` which specifies which base registry to use - Defaults to quay.io/biocontainers to match existing modules - When it is changed, any containers specified by name (e.g. multiqc:latest) will be pulled from the registry defined in `--registry`. - This is aimed at using `--registry public.ecr.aws/biocontainers` --- CHANGELOG.md | 1 + nf_core/pipeline-template/nextflow.config | 2 ++ .../pipeline-template/nextflow_schema.json | 23 ++++++++++++++++--- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce74b77b8f..72c9a3a92a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Consistent syntax for branch checks in PRs ([#2202](https://github.com/nf-core/tools/issues/2202)) - Fixed minor Jinja2 templating bug that caused the PR template to miss a newline - Updated AWS tests to use newly moved `seqeralabs/action-tower-launch` instead of `nf-core/tower-action` +- Added parameter `--registry` to pipeline template for a configurable default container registry. ### Linting diff --git a/nf_core/pipeline-template/nextflow.config b/nf_core/pipeline-template/nextflow.config index cc591a54e5..9e906c4b5d 100644 --- a/nf_core/pipeline-template/nextflow.config +++ b/nf_core/pipeline-template/nextflow.config @@ -41,6 +41,7 @@ params { validate_params = true show_hidden_params = false schema_ignore_params = 'genomes' + registry = 'quay.io/biocontainers' {% if nf_core_configs %} // Config options @@ -101,6 +102,7 @@ profiles { } docker { docker.enabled = true + docker.registry = params.registry docker.userEmulation = true conda.enabled = false singularity.enabled = false diff --git a/nf_core/pipeline-template/nextflow_schema.json b/nf_core/pipeline-template/nextflow_schema.json index 2743562d6c..6193efc65d 100644 --- a/nf_core/pipeline-template/nextflow_schema.json +++ b/nf_core/pipeline-template/nextflow_schema.json @@ -10,7 +10,10 @@ "type": "object", "fa_icon": "fas fa-terminal", "description": "Define where the pipeline should find input data and save output data.", - "required": ["input", "outdir"], + "required": [ + "input", + "outdir" + ], "properties": { "input": { "type": "string", @@ -39,6 +42,13 @@ "type": "string", "description": "MultiQC report title. Printed as page header, used for filename if not otherwise specified.", "fa_icon": "fas fa-file-signature" + }, + "registry": { + "type": "string", + "default": "quay.io/biocontainers", + "description": "Default docker container registry", + "help_text": "The default docker container registry that will be used if a simple docker image name is used. Set this to a different registry if an mirror or private registry is required, e.g. public.ecr.aws/biocontainers/. By default, this is quay.io/biocontainers.", + "fa_icon": "fas fa-cog" } } }, @@ -188,7 +198,14 @@ "description": "Method used to save pipeline results to output directory.", "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", "fa_icon": "fas fa-copy", - "enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"], + "enum": [ + "symlink", + "rellink", + "link", + "copy", + "copyNoFollow", + "move" + ], "hidden": true }, "email_on_fail": { @@ -284,4 +301,4 @@ "$ref": "#/definitions/generic_options" } ] -} +} \ No newline at end of file From e7ac058b89f8f36fb45b54ec16db3f1206fc3fb5 Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Mon, 3 Apr 2023 15:08:04 +0100 Subject: [PATCH 2/6] swap params.registry -> params.container_registry --- CHANGELOG.md | 2 +- nf_core/pipeline-template/nextflow.config | 4 ++-- nf_core/pipeline-template/nextflow_schema.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72c9a3a92a..71bb614374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ - Consistent syntax for branch checks in PRs ([#2202](https://github.com/nf-core/tools/issues/2202)) - Fixed minor Jinja2 templating bug that caused the PR template to miss a newline - Updated AWS tests to use newly moved `seqeralabs/action-tower-launch` instead of `nf-core/tower-action` -- Added parameter `--registry` to pipeline template for a configurable default container registry. +- Added parameter `--container_registry` to pipeline template for a configurable default container registry. ### Linting diff --git a/nf_core/pipeline-template/nextflow.config b/nf_core/pipeline-template/nextflow.config index 9e906c4b5d..cd2fc05789 100644 --- a/nf_core/pipeline-template/nextflow.config +++ b/nf_core/pipeline-template/nextflow.config @@ -41,7 +41,7 @@ params { validate_params = true show_hidden_params = false schema_ignore_params = 'genomes' - registry = 'quay.io/biocontainers' + params.container_registry = 'quay.io/biocontainers' {% if nf_core_configs %} // Config options @@ -102,7 +102,7 @@ profiles { } docker { docker.enabled = true - docker.registry = params.registry + docker.registry = params.container_registry docker.userEmulation = true conda.enabled = false singularity.enabled = false diff --git a/nf_core/pipeline-template/nextflow_schema.json b/nf_core/pipeline-template/nextflow_schema.json index 6193efc65d..f07bd4ca45 100644 --- a/nf_core/pipeline-template/nextflow_schema.json +++ b/nf_core/pipeline-template/nextflow_schema.json @@ -43,7 +43,7 @@ "description": "MultiQC report title. Printed as page header, used for filename if not otherwise specified.", "fa_icon": "fas fa-file-signature" }, - "registry": { + "container_registry": { "type": "string", "default": "quay.io/biocontainers", "description": "Default docker container registry", From f114ec653d7c18e11c0f163a4e229c02287ad437 Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Mon, 3 Apr 2023 15:24:10 +0100 Subject: [PATCH 3/6] prettier --- nf_core/pipeline-template/nextflow_schema.json | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/nf_core/pipeline-template/nextflow_schema.json b/nf_core/pipeline-template/nextflow_schema.json index f07bd4ca45..dbc4d776d4 100644 --- a/nf_core/pipeline-template/nextflow_schema.json +++ b/nf_core/pipeline-template/nextflow_schema.json @@ -10,10 +10,7 @@ "type": "object", "fa_icon": "fas fa-terminal", "description": "Define where the pipeline should find input data and save output data.", - "required": [ - "input", - "outdir" - ], + "required": ["input", "outdir"], "properties": { "input": { "type": "string", @@ -198,14 +195,7 @@ "description": "Method used to save pipeline results to output directory.", "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", "fa_icon": "fas fa-copy", - "enum": [ - "symlink", - "rellink", - "link", - "copy", - "copyNoFollow", - "move" - ], + "enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"], "hidden": true }, "email_on_fail": { @@ -301,4 +291,4 @@ "$ref": "#/definitions/generic_options" } ] -} \ No newline at end of file +} From 653c2f4bf17a80d7c207203e99a276fcbb014f2f Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Wed, 5 Apr 2023 17:08:53 +0100 Subject: [PATCH 4/6] Remove container_registry from params Changes: - Sets docker.registry directly in the Docker scope - Removes param.container_registry which might have caused problems in various environments. --- CHANGELOG.md | 2 +- nf_core/pipeline-template/nextflow.config | 3 +-- nf_core/pipeline-template/nextflow_schema.json | 7 ------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71bb614374..ef1321eaf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ - Consistent syntax for branch checks in PRs ([#2202](https://github.com/nf-core/tools/issues/2202)) - Fixed minor Jinja2 templating bug that caused the PR template to miss a newline - Updated AWS tests to use newly moved `seqeralabs/action-tower-launch` instead of `nf-core/tower-action` -- Added parameter `--container_registry` to pipeline template for a configurable default container registry. +- Added config `docker.registry` to pipeline template for a configurable default container registry when using Docker containers. Defaults to `quay.io`. ### Linting diff --git a/nf_core/pipeline-template/nextflow.config b/nf_core/pipeline-template/nextflow.config index cd2fc05789..a67f79a6d0 100644 --- a/nf_core/pipeline-template/nextflow.config +++ b/nf_core/pipeline-template/nextflow.config @@ -41,7 +41,6 @@ params { validate_params = true show_hidden_params = false schema_ignore_params = 'genomes' - params.container_registry = 'quay.io/biocontainers' {% if nf_core_configs %} // Config options @@ -102,7 +101,7 @@ profiles { } docker { docker.enabled = true - docker.registry = params.container_registry + docker.registry = 'quay.io' docker.userEmulation = true conda.enabled = false singularity.enabled = false diff --git a/nf_core/pipeline-template/nextflow_schema.json b/nf_core/pipeline-template/nextflow_schema.json index dbc4d776d4..2743562d6c 100644 --- a/nf_core/pipeline-template/nextflow_schema.json +++ b/nf_core/pipeline-template/nextflow_schema.json @@ -39,13 +39,6 @@ "type": "string", "description": "MultiQC report title. Printed as page header, used for filename if not otherwise specified.", "fa_icon": "fas fa-file-signature" - }, - "container_registry": { - "type": "string", - "default": "quay.io/biocontainers", - "description": "Default docker container registry", - "help_text": "The default docker container registry that will be used if a simple docker image name is used. Set this to a different registry if an mirror or private registry is required, e.g. public.ecr.aws/biocontainers/. By default, this is quay.io/biocontainers.", - "fa_icon": "fas fa-cog" } } }, From a963a8554342e7559eef0553b1cc4243ccdad6c3 Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Wed, 5 Apr 2023 17:33:58 +0100 Subject: [PATCH 5/6] CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef1321eaf7..85d07a6fef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ - Consistent syntax for branch checks in PRs ([#2202](https://github.com/nf-core/tools/issues/2202)) - Fixed minor Jinja2 templating bug that caused the PR template to miss a newline - Updated AWS tests to use newly moved `seqeralabs/action-tower-launch` instead of `nf-core/tower-action` -- Added config `docker.registry` to pipeline template for a configurable default container registry when using Docker containers. Defaults to `quay.io`. +- Added config `docker.registry` to pipeline template for a configurable default container registry when using Docker containers. Defaults to `quay.io` ([#2133](https://github.com/nf-core/tools/pull/2133)) ### Linting From 1c2356d448e0405b856cc597835c8aa9177d03f5 Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Fri, 21 Apr 2023 12:43:01 +0100 Subject: [PATCH 6/6] Add podman.registry config option --- nf_core/pipeline-template/nextflow.config | 1 + 1 file changed, 1 insertion(+) diff --git a/nf_core/pipeline-template/nextflow.config b/nf_core/pipeline-template/nextflow.config index b406b37378..94a591e8f4 100644 --- a/nf_core/pipeline-template/nextflow.config +++ b/nf_core/pipeline-template/nextflow.config @@ -127,6 +127,7 @@ profiles { } podman { podman.enabled = true + podman.registry = 'quay.io' conda.enabled = false docker.enabled = false singularity.enabled = false