datastack-net/dockerized

Easier Version Selection

cawoodm opened this issue · 3 comments

Instead of
NODE_VERSION=15.0.0 dockerized node
how about
dockerized node:15

Just a suggestion!

Hi @cawoodm!

Yeah, this would be way handier, and I am in favor of adding it.

Before expanding scripts, I want to think about how to add features in a maintainable way.
Duplicated scripts in Bash and Powershell is fine for now, but just a few more options/arguments and it will become a mess.

See #7 for some details on this.

This feature is now possible to implement.

I'm in doubt weather it would make sense to allow a syntax like node15 rather than node:15. This is a bit easier in typing and in some cases works quite naturally, like python2.7.

I also just noticed that your suggestion implies two changes:

  1. Specifying version after the command, separated by :
  2. Translating 15.0.0 to 15

The second feature is sort of already supported, as most docker images are released under multiple tags, so that :15 would refer to the latest 15.*.*. This is not always the case though.

To be continued

Implemented in 2.11! Check it out ☺️