Reputation: 876
I was playing around with a script that allows me to find out the OS version of docker images. Trying the latter on alpine:edge
returned this 3.13.0_alpha20200626
.
Printing /etc/os-release outputs the following
/ # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.13.0_alpha20200626
PRETTY_NAME="Alpine Linux edge"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
Surely this version would not validate as SemVer. What version scheme is this alpine version following?
Upvotes: 1
Views: 1577
Reputation: 60046
First, Alpine edge
is always under development so that is why the version ID contains the date, while for the stable release it will contain standard version ID
with pretty Name.
Warning: "edge" is under constant development so be careful using it in production. It is possible that bugs in "edge" could cause data loss or could break your system.
So you should relay on pretty name instead of version ID.
docker tag refer to version ID for example the tag is alpine:3.7.3
then the ID will be 3.7.3
I did not find any official documentation but here is something can help you
VERSION_ID=3.{Major}.{minor}
PRETTY_NAME="Alpine Linux 3.{Major}"
So pretty name will always refer the major version, no mater whats the minor version is
alpine:3.7.3 ---> PRETTY_NAME="Alpine Linux v3.7"
alpine:3.8 ---> PRETTY_NAME="Alpine Linux v3.8"
alpine:3.9 ---> PRETTY_NAME="Alpine Linux v3.9"
while this is different for edge releases.
VERSION_ID=3.{CURRENT_MAJOR}_alpha{SNAPSHOT_DATE}
PRETTY_NAME="Alpine Linux {edge}"
Stable releases are just what they sound like: initially a point-in-time snapshot of the package archives, but then maintained with bug-fixes only in order to keep a stable environment.
Edge is more of a rolling-release, with the latest and greatest packages available in the online repositories.
What_is_the_difference_between_edge_and_stable_releases
Upvotes: 2