ReproNim / neurodocker

Generate custom Docker and Singularity images, and minimize existing containers
https://www.repronim.org/neurodocker/
Apache License 2.0
329 stars 97 forks source link

FIX: --version output in containers #493

Closed kaczmarj closed 1 year ago

kaczmarj commented 1 year ago

Prior to this PR, the --version output from containers would include dirty, indicating uncommitted changes. This was because /docs was not copied into the docker images.

Before this commit, the version output looks like this:

$ docker run --rm repronim/neurodocker:0.9.1 --version
neurodocker version 0.9.1+0.gad2f3a6.dirty

And after this commit, the version is:

$ docker run --rm neurodocker --version                                                                                           
neurodocker version 0.9.1+8.gf7f2aaf

Note the lack of .dirty in the output.

By excluding /docs from the Docker images, we were modifying the state of the git repository, and git status was reporting uncommitted changes. This caused the command neurodocker --version to show that there were uncommitted changes (by including the dirty suffix in the version). We do not want users to be under the impression that the version includes uncommitted changes. Indeed, kaczmarj excluded /docs from the docker builds as a premature optimization... it turns out that they only consume 136 kb, which is negligible.

codecov[bot] commented 1 year ago

Codecov Report

Base: 83.74% // Head: 83.74% // No change to project coverage :thumbsup:

Coverage data is based on head (f79ef3e) compared to base (218697a). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #493 +/- ## ======================================= Coverage 83.74% 83.74% ======================================= Files 11 11 Lines 1015 1015 ======================================= Hits 850 850 Misses 165 165 ``` Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ReproNim). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ReproNim)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.