conda_dockerfile¶
-
PipelineLint.conda_dockerfile()¶ Checks the Dockerfile for use with Conda environments
Note
This test only runs if there is both an
environment.ymlandDockerfilepresent in the pipeline root directory.If a workflow has a conda
environment.ymlfile, theDockerfileshould use this to create the docker image. These files are typically very short, just creating the conda environment inside the container.This linting test checks for the following:
All of the following lines are present in the file (where
PIPELINEis your pipeline name):FROM nfcore/base:VERSION COPY environment.yml / RUN conda env create --quiet -f /environment.yml && conda clean -a RUN conda env export --name PIPELINE > PIPELINE.yml ENV PATH /opt/conda/envs/PIPELINE/bin:$PATH
That the
FROM nfcore/base:VERSIONis tagged to the most recent release of nf-core/toolsThe linting tool compares the tag against the currently installed version of tools.
This line is not checked if running a development version of nf-core/tools.
Tip
Additional lines and different metadata can be added to the
Dockerfilewithout causing this lint test to fail.