Skip to content

Commit

Permalink
Removed quay.io from all docker containers
Browse files Browse the repository at this point in the history
quay.io is now a pipeline-level default, so we remove it from all Docker
container references. This should still build pipelines as before.
  • Loading branch information
adamrtalbot committed Apr 25, 2023
1 parent 54df52f commit 437148c
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
- Remove `.cff` files from `.editorconfig` [(#2145)[https://github.com/nf-core/tools/pull/2145]]
- Simplify pipeline README ([#2186](https://github.com/nf-core/tools/issues/2186))
- Added support for the apptainer container engine via `-profile apptainer`. ([#2244](https://github.com/nf-core/tools/issues/2244)) [Contributed by @jfy133]
- 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))
- Removed `quay.io` from all module Docker container references as this is now supplied at pipeline level. ([#2249](https://github.com/nf-core/tools/pull/2249))

### Linting

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ The Singularity image download finds containers using two methods:
2. It scrapes any files it finds with a `.nf` file extension in the workflow `modules` directory for lines
that look like `container = "xxx"`. This is the typical method for DSL2 pipelines, which have one container per process.

Some DSL2 modules have container addresses for docker (eg. `quay.io/biocontainers/fastqc:0.11.9--0`) and also URLs for direct downloads of a Singularity continaer (eg. `https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0`).
Some DSL2 modules have container addresses for docker (eg. `biocontainers/fastqc:0.11.9--0`) and also URLs for direct downloads of a Singularity continaer (eg. `https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0`).
Where both are found, the download URL is preferred.

Once a full list of containers is found, they are processed in the following order:
Expand Down
2 changes: 1 addition & 1 deletion nf_core/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def find_container_images(self):
Later DSL2:
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0' :
'quay.io/biocontainers/fastqc:0.11.9--0' }"
'biocontainers/fastqc:0.11.9--0' }"
DSL1 / Special case DSL2:
container "nfcore/cellranger:6.0.2"
Expand Down
2 changes: 1 addition & 1 deletion nf_core/module-template/modules/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ process {{ component_name_underscore|upper }} {
conda "{{ bioconda if bioconda else 'YOUR-TOOL-HERE' }}"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'{{ singularity_container if singularity_container else 'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE' }}':
'{{ docker_container if docker_container else 'quay.io/biocontainers/YOUR-TOOL-HERE' }}' }"
'{{ docker_container if docker_container else 'biocontainers/YOUR-TOOL-HERE' }}' }"

input:
{% if not_empty_template -%}
Expand Down
2 changes: 1 addition & 1 deletion nf_core/modules/bump_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def bump_module_version(self, module):

patterns = [
(bioconda_packages[0], f"'bioconda::{bioconda_tool_name}={last_ver}'"),
(rf"quay.io/biocontainers/{bioconda_tool_name}:[^'\"\s]+", docker_img),
(rf"biocontainers/{bioconda_tool_name}:[^'\"\s]+", docker_img),
(
rf"https://depot.galaxyproject.org/singularity/{bioconda_tool_name}:[^'\"\s]+",
singularity_img,
Expand Down
6 changes: 5 additions & 1 deletion nf_core/modules/lint/main_nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,5 +545,9 @@ def _container_type(line):
if url_match:
return "singularity"
return None
if line.startswith("biocontainers/") or line.startswith("quay.io/"):
if (
line.startswith("biocontainers/")
or line.startswith("quay.io/")
or (line.count("/") == 1 and line.count(":") == 1)
):
return "docker"
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process SAMPLESHEET_CHECK {
conda "conda-forge::python=3.8.3"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/python:3.8.3' :
'quay.io/biocontainers/python:3.8.3' }"
'biocontainers/python:3.8.3' }"

input:
path samplesheet
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def mock_biocontainers_api_calls(rsps: responses.RequestsMock, module, version):
},
{
"image_type": "Docker",
"image_name": f"quay.io/biocontainers/{module}:{version}",
"image_name": f"biocontainers/{module}:{version}",
"updated": "2021-09-04T00:00:00Z",
},
],
Expand Down

0 comments on commit 437148c

Please sign in to comment.