Set a dummy-version if none set, and remove unused APT_MIRROR build-arg#3267
Set a dummy-version if none set, and remove unused APT_MIRROR build-arg#3267neersighted merged 2 commits intodocker:mainfrom
Conversation
Dockerfile
Outdated
| COPY . . | ||
|
|
||
| ARG VERSION | ||
| ARG VERSION=0.0.0-dev |
There was a problem hiding this comment.
I chose 0.0.0-dev, but not sure if anything uses the version, so if 99.9.9-dev or 99.0.0-dev ("always higher than what exists") would be better.
Happy to change!
There was a problem hiding this comment.
Okay either way, but maybe someone with more python experience than me can chime in.
There was a problem hiding this comment.
PEP-440 defines the syntax for declaring a development package as the .devN suffix (where N is just a number), so I'd use that instead of -dev.
pip should only install stable packages when dependencies are declared as someDep >= 1.2.3, but it will allow installation of .devN dependencies if by chance the user has a dependency declared as someDep >= 4.5.6.dev2 for example.
Because of ☝️, I'd suggest staying with the lower v 0.0.0.dev just to be on the safer side in case we accidentally end up publishing a package with that version to pypi.
I'm not 100% sure this is the best approach though, so if others have more experience please chime in 😄
There was a problem hiding this comment.
If it expects a number after .dev, I can make it 0.0.0.dev0 I guess @neersighted SGTY?
There was a problem hiding this comment.
0.0.0.dev0 is PEP 440 (though the current spec lives at https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers) compliant, so that works for me.
Notably all numeric components are allowed to be 0; the proposed version does pass Poetry's PEP 440 validation, which is notoriously a bit strict.
neersighted
left a comment
There was a problem hiding this comment.
Use a PEP 440-compliant version (e.g. the proposed 0.0.0.dev0 works).
210f353 to
df697d6
Compare
|
@neersighted updated to use |
Make sure the Dockerfiles can be built even if no VERSION build-arg is passed. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The APT_MIRROR build-arg was removed from the Dockerfile in commit ee23105, but wasn't removed from the Makefile. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
df697d6 to
99ce2e6
Compare
Set a dummy-version if none set
Make sure the Dockerfiles can be built even if no VERSION build-arg is passed.
Makefile: remove unused APT_MIRROR build-arg
The APT_MIRROR build-arg was removed from the Dockerfile in commit
ee23105, but wasn't removed from the
Makefile.