Skip to content

Commit

Permalink
Updated Docker Client
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianeicher committed Oct 5, 2020
1 parent 9281a6c commit 6e195a4
Show file tree
Hide file tree
Showing 3 changed files with 235 additions and 9 deletions.
18 changes: 18 additions & 0 deletions docker/client.watch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from urllib import request
import re

def get_versions(os, channel):
data = request.urlopen('https://download.docker.com/' + os + '/static/' + channel + '/x86_64/').read().decode('utf-8')
return re.findall(r'docker-([0-9\.]+)\.tgz<\/a>', data)

stable_versions = get_versions('linux', 'stable')
edge_versions = get_versions('linux', 'edge')

releases = []
for version in edge_versions:
releases.append({
'version': version.replace('.03.', '.3.').replace('.06.', '.6.').replace('.09.', '.9.'),
'version-original': version,
'stability': 'stable' if version in stable_versions else 'testing',
'channel': 'stable' if version in stable_versions else 'edge'
})
Loading

0 comments on commit 6e195a4

Please sign in to comment.